JP6058722B2 - Skin image analysis apparatus, image processing apparatus, and computer program - Google Patents

Skin image analysis apparatus, image processing apparatus, and computer program Download PDF

Info

Publication number
JP6058722B2
JP6058722B2 JP2015053200A JP2015053200A JP6058722B2 JP 6058722 B2 JP6058722 B2 JP 6058722B2 JP 2015053200 A JP2015053200 A JP 2015053200A JP 2015053200 A JP2015053200 A JP 2015053200A JP 6058722 B2 JP6058722 B2 JP 6058722B2
Authority
JP
Japan
Prior art keywords
region
image
original image
area
face
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.)
Expired - Fee Related
Application number
JP2015053200A
Other languages
Japanese (ja)
Other versions
JP2016173716A (en
Inventor
サムエル ボーマン
サムエル ボーマン
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.)
JMEC CO., LTD.
Original Assignee
JMEC CO., LTD.
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 JMEC CO., LTD. filed Critical JMEC CO., LTD.
Priority to JP2015053200A priority Critical patent/JP6058722B2/en
Publication of JP2016173716A publication Critical patent/JP2016173716A/en
Application granted granted Critical
Publication of JP6058722B2 publication Critical patent/JP6058722B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、画像処理技術に関し、特に人物の顔画像から顔パーツをマスクして肌解析を行う技術に関する。   The present invention relates to an image processing technique, and more particularly to a technique for performing skin analysis by masking facial parts from a human face image.

従来、人物の顔を撮影した画像を用いて、肌の状態を解析する装置が知られている(例えば特許文献1)。そして、肌の解析手法として、この特許文献以外にも様々なものが提案されている。   2. Description of the Related Art Conventionally, an apparatus that analyzes a skin state using an image obtained by photographing a human face is known (for example, Patent Document 1). Various methods other than this patent document have been proposed as skin analysis methods.

特開2011−130808号公報JP 2011-130808 A

ところで、一般には、眉、目、鼻孔、唇といったいわゆる顔のパーツ部分は肌解析の対象にはならない。従って、人物の顔画像から自動的に肌の解析を行うときは、顔パーツを自動的に除外する必要がある。   By the way, in general, so-called facial parts such as eyebrows, eyes, nostrils, and lips are not subject to skin analysis. Therefore, when automatically analyzing skin from a human face image, it is necessary to automatically exclude facial parts.

このとき、顔パーツを除外するためのマスクをテンプレートとして用意しておき、顔画像に適用するやり方も考えられる。しかしながら、画像内での顔パーツの位置及び大きさは、撮影条件により変動することもあるとともに、個人差もあることから、テンプレートでは必ずしも正確に顔パーツを除外できない場合もある。   At this time, a method of preparing a mask for excluding face parts as a template and applying it to the face image is also conceivable. However, the position and size of the facial parts in the image may vary depending on the shooting conditions and may vary from person to person. Therefore, the facial parts may not always be accurately excluded from the template.

そこで、本発明の目的は、撮影時の条件等に依らず、人物の顔画像から顔パーツを精度良く自動的に除外することである。   Accordingly, an object of the present invention is to automatically and accurately exclude facial parts from a human face image regardless of shooting conditions and the like.

本発明の別の目的は、肌画像解析を行うために、人物の顔画像から自動的に肌解析の対象領域を特定することである。   Another object of the present invention is to automatically specify a target area for skin analysis from a human face image in order to perform skin image analysis.

本発明の一つの実施態様に従う肌画像解析装置は、被験者の顔を撮影したRGB成分を有する原画像の画像データを記憶する記憶部と、前記原画像で明度及び色相が所定範囲内の画素を抽出して、前記被験者の顔面領域を特定する手段と、前記原画像で正規化されたG(緑)成分または色相が所定範囲内の画素を抽出して、前記顔面領域内の唇を含む第1領域を特定する手段と、前記原画像を微分した微分画像の画像データまたは前記原画像をグレースケール化したグレースケール画像の画像データに応じて、前記顔面領域内の眉を含む第2領域を特定する手段と、前記原画像で明度が所定範囲内の画素を抽出して、前記顔面領域内の閉じた目を含む第3領域を特定する手段と、前記原画像で、前記顔面領域から前記第1領域〜第3領域のうちの少なくとも一つの領域を除去した領域内の正規化されたR(赤)成分が所定範囲内の画素を抽出して、前記顔面領域内の鼻孔を含む第4領域を特定する手段と、前記顔面領域から前記第1領域〜第4領域のうちの少なくとも一つの領域を除去した肌領域を抽出する手段と、前記肌領域の原画像データに応じて、前記被験者の肌の状態を解析する解析手段と、を備える。   A skin image analysis apparatus according to one embodiment of the present invention includes a storage unit that stores image data of an original image having an RGB component obtained by photographing a face of a subject, and pixels having brightness and hue in a predetermined range in the original image. Means for extracting and specifying the facial region of the subject, and extracting a pixel whose G (green) component or hue normalized by the original image is within a predetermined range and including lips in the facial region. A second region including an eyebrow in the facial region in accordance with means for specifying one region and image data of a differential image obtained by differentiating the original image or image data of a grayscale image obtained by converting the original image to gray scale Means for extracting a pixel having a lightness within a predetermined range in the original image, specifying a third region including a closed eye in the facial region, and in the original image, from the facial region, 1st to 3rd region Means for extracting a pixel in which a normalized R (red) component in a region from which at least one region has been removed is within a predetermined range and identifying a fourth region including a nostril in the facial region; Means for extracting a skin region from which at least one of the first region to the fourth region is removed from the region, and analysis means for analyzing the skin condition of the subject according to the original image data of the skin region And comprising.

好適な実施態様では、前記顔面領域を特定する手段は、前記グレースケール画像の画素値の分布に応じて第1の範囲を定め、前記原画像の画素値を色相に変換した画像である色相画像の画素値の分布に応じて第2の範囲を定め、前記グレースケール画像の画素値が第1の範囲内であり、かつ、前記色相画像の画素値が第2の範囲内である画素を抽出するようにしても良い。   In a preferred embodiment, the means for specifying the facial region defines a first range according to a distribution of pixel values of the grayscale image, and a hue image that is an image obtained by converting the pixel values of the original image into a hue. A second range is determined according to the distribution of the pixel values of the pixels, and pixels whose pixel values of the grayscale image are in the first range and whose pixel values of the hue image are in the second range are extracted. You may make it do.

好適な実施態様では、前記顔面領域内の唇を含む第1領域を特定する手段は、前記原画像の画素値をG/(R+G+B)に変換した画像であるG比率画像の画素値の分布に応じて第3の範囲を定め、前記G比率画像の画素値が第3の範囲内である画素を含む領域を第1唇候補領域とし、前記G比率画像の画素値が第3の範囲内である画素を特定して2値化した画像に対してシワ消し処理を適用し、残った画素を含む領域を第2唇候補領域とし、第1唇候補領域及び第2唇候補領域のいずれか一方を第1領域としても良い。   In a preferred embodiment, the means for specifying the first region including the lips in the face region has a pixel value distribution of a G ratio image which is an image obtained by converting the pixel value of the original image into G / (R + G + B). Accordingly, a third range is defined, and a region including pixels whose pixel values of the G ratio image are within the third range is defined as a first lip candidate region, and the pixel values of the G ratio image are within the third range. A wrinkle elimination process is applied to a binarized image by specifying a certain pixel, and a region including the remaining pixels is set as a second lip candidate region, and one of the first lip candidate region and the second lip candidate region May be the first region.

好適な実施態様では、前記顔面領域内の眉を含む第2領域を特定する手段は、前記微分画像の画素値の分布に応じて定めた閾値に従って前記微分画像を2値化した画像である微分2値化画像を生成し、前記微分2値化画像を平滑化した画像である平滑化画像を生成し、前記平滑化画像に応じて第2領域を定めても良い。   In a preferred embodiment, the means for specifying the second region including the eyebrows in the face region is a differential that is an image obtained by binarizing the differential image according to a threshold value determined in accordance with a distribution of pixel values of the differential image. A binarized image may be generated, a smoothed image that is an image obtained by smoothing the differential binarized image may be generated, and the second region may be determined according to the smoothed image.

好適な実施態様では、前記顔面領域内の眉を含む第2領域を特定する手段は、前記微分画像の画素値の分布に応じて定めた閾値に従って前記微分画像を2値化した画像である微分2値化画像を生成し、前記微分2値化画像を平滑化した画像である平滑化画像を生成し、前記平滑化画像に応じて第3眉候補領域を定め、前記グレースケール画像の画素値の分布に応じて定めた閾値に従って前記グレースケール画像を2値化した画像であるグレースケール2値化画像を生成し、前記グレースケール2値化画像に応じて第4眉候補領域を定め、第3眉候補領域及び第4眉候補領域のいずれか一方を第2領域としても良い。   In a preferred embodiment, the means for specifying the second region including the eyebrows in the face region is a differential that is an image obtained by binarizing the differential image according to a threshold value determined in accordance with a distribution of pixel values of the differential image. A binarized image is generated, a smoothed image that is a smoothed image of the differential binarized image is generated, a third eyebrow candidate region is determined according to the smoothed image, and a pixel value of the grayscale image Generating a grayscale binarized image that is an image obtained by binarizing the grayscale image according to a threshold value determined according to the distribution of the image; determining a fourth eyebrow candidate region according to the grayscale binarized image; One of the 3 eyebrow candidate areas and the 4th eyebrow candidate area may be set as the second area.

好適な実施態様では、前記顔面領域内の鼻孔を含む第4領域を特定する手段は、前記原画像の明度に応じて第4の範囲を定め、前記原画像の画素値をR/(R+G+B)に変換した画像であるR比率画像の画素値の分布に応じて第5の範囲を定め、明度が第4の範囲内であり、かつ、前記R比率画像の画素値が第5の範囲内である画素を含む領域を第4領域としても良い。   In a preferred embodiment, the means for specifying the fourth region including the nostril in the face region defines a fourth range according to the brightness of the original image, and sets the pixel value of the original image to R / (R + G + B). The fifth range is determined according to the distribution of the pixel value of the R ratio image that is the image converted to, the brightness is within the fourth range, and the pixel value of the R ratio image is within the fifth range. A region including a certain pixel may be set as the fourth region.

好適な実施態様では、前記顔面領域内の鼻孔を含む第4領域を特定する手段は、明度が第4の範囲内であり、かつ、前記R比率画像の画素値が第5の範囲内である画素が連結して形成された複数の領域のうち、面積の広さが上位の4つの領域の相互の位置関係に応じて第4領域を特定しても良い。   In a preferred embodiment, the means for identifying the fourth region including the nostril in the facial region has a lightness within a fourth range and a pixel value of the R ratio image within a fifth range. Of the plurality of regions formed by connecting the pixels, the fourth region may be specified in accordance with the mutual positional relationship of the four regions having the upper area.

本発明の一つの実施態様に従う画像処理装置は、被験者の顔を撮影したRGB成分を有する原画像の画像データを記憶する記憶部と、前記原画像で明度及び色相が所定範囲内の画素を抽出して、前記被験者の顔面領域を特定する手段と、前記原画像で正規化されたG(緑)成分または色相が所定範囲内の画素を抽出して、前記顔面領域内の唇を含む第1領域を特定する手段と、前記原画像を微分した微分画像の画像データまたは前記原画像をグレースケール化したグレースケール画像の画像データに応じて、前記顔面領域内の眉を含む第2領域を特定する手段と、前記原画像で明度が所定範囲内の画素を抽出して、前記顔面領域内の閉じた目を含む第3領域を特定する手段と、前記原画像で、前記顔面領域から前記第1領域〜第3領域のうちの少なくとも一つの領域を除去した領域内の正規化されたR(赤)成分が所定範囲内の画素を抽出して、前記顔面領域内の鼻孔を含む第4領域を特定する手段と、前記顔面領域から前記第1領域〜第4領域のうちの少なくとも一つの領域を除去した肌領域を抽出する手段と、を備える。   An image processing apparatus according to an embodiment of the present invention includes a storage unit that stores image data of an original image having an RGB component obtained by photographing a face of a subject, and pixels having brightness and hue within a predetermined range from the original image Then, a means for specifying the facial area of the subject, and a G (green) component or hue normalized by the original image is extracted within a predetermined range, and includes a lip in the facial area. A second region including an eyebrow in the facial region is specified according to means for specifying a region and image data of a differential image obtained by differentiating the original image or image data of a grayscale image obtained by converting the original image to gray scale Means for extracting a pixel having a lightness within a predetermined range in the original image and identifying a third region including a closed eye in the facial region; and in the original image, the first region from the facial region Of the first to third areas Means for extracting a pixel in which a normalized R (red) component in a region from which at least one region has been removed is within a predetermined range and identifying a fourth region including a nostril in the facial region; and the facial region Means for extracting a skin region from which at least one of the first to fourth regions is removed.

本発明の一つの実施態様に従う肌画像解析装置は、被験者の顔を撮影したRGB成分を有する原画像の画像データを記憶する記憶部と、前記原画像の色成分に応じて、前記被験者の唇を含む唇領域を特定する手段と、前記唇領域よりも上の領域の明度または色成分に応じて、前記被験者の眉を含む眉領域及び前記被験者の閉じた目を含む目領域を特定する手段と、前記唇領域よりも上の領域であり、かつ、前記眉領域及び目領域よりも下の領域の色成分に応じて、前記被験者の鼻孔を含む鼻孔領域を特定する手段と、前記被験者の顔面領域から前記唇、眉、目及び鼻孔の各領域を除去した肌領域を特定する手段と、前記肌領域の原画像データに応じて、前記被験者の肌の状態を解析する解析手段と、を備える。   A skin image analysis apparatus according to one embodiment of the present invention includes a storage unit that stores image data of an original image having RGB components obtained by photographing a face of a subject, and the lips of the subject according to the color components of the original image. Means for specifying the lip region including the eyebrow region including the eyebrow of the subject and the eye region including the closed eye of the subject according to the lightness or color component of the region above the lip region And a means for specifying a nostril region including the nostril of the subject according to color components of the region above the lip region and below the eyebrow region and the eye region, Means for identifying a skin area obtained by removing the lip, eyebrow, eye and nostril areas from the face area; and analyzing means for analyzing the skin condition of the subject according to the original image data of the skin area. Prepare.

本発明の一実施形態にかかる画像処理装置1の全体構成図である。1 is an overall configuration diagram of an image processing apparatus 1 according to an embodiment of the present invention. 本実施形態の画像処理装置1の全体処理手順を示す。An overall processing procedure of the image processing apparatus 1 according to the present embodiment will be described. ステップS230の顔面領域抽出処理の詳細な処理手順を示すフローチャートである。It is a flowchart which shows the detailed process sequence of the face area extraction process of step S230. グレースケール画像のヒストグラムの一例と、色相画像のヒストグラムの一例を示す。An example of a histogram of a gray scale image and an example of a histogram of a hue image are shown. ステップS240の唇抽出処理の詳細な処理手順を示すフローチャートである。It is a flowchart which shows the detailed process sequence of the lip extraction process of step S240. 目領域及び眉領域を抽出する処理の全体を示すフローチャートである。It is a flowchart which shows the whole process which extracts an eye area | region and an eyebrow area | region. ステップS611等の目抽出処理の詳細な処理手順を示すフローチャートである。It is a flowchart which shows the detailed process sequence of eye extraction processing, such as step S611. ステップS613等の眉領域抽出処理の詳細な手順を示すフローチャートである。It is a flowchart which shows the detailed procedure of eyebrow area | region extraction processing, such as step S613. ステップS811の眉・微分画像処理の詳細な手順を示すフローチャートである。It is a flowchart which shows the detailed procedure of the eyebrow and differential image process of step S811. ステップS813の眉・微分画像処理の詳細な手順を示すフローチャートである。It is a flowchart which shows the detailed procedure of an eyebrow and differential image process of step S813. ステップS260の鼻孔抽出処理の詳細な手順を示すフローチャートである。It is a flowchart which shows the detailed procedure of the nostril extraction process of step S260.

以下、本発明の一実施形態に係る画像処理装置について、図面を参照して説明する。本実施形態にかかる画像処理装置は、特に、顔の肌の状態を画像解析する肌画像解析装置である。   Hereinafter, an image processing apparatus according to an embodiment of the present invention will be described with reference to the drawings. The image processing apparatus according to the present embodiment is a skin image analysis apparatus that analyzes an image of the skin condition of a face.

図1は、本実施形態にかかる画像処理装置1の全体構成図である。   FIG. 1 is an overall configuration diagram of an image processing apparatus 1 according to the present embodiment.

本画像処理装置1は、画像処理装置本体10とカメラ5とを備える。   The image processing apparatus 1 includes an image processing apparatus main body 10 and a camera 5.

画像処理装置本体10は、例えば、プロセッサ、メモリ等を有する汎用的なコンピュータシステムにより構成され、以下に説明する個々の構成要素または機能は、例えば、コンピュータシステム上で所定のコンピュータプログラムを実行することにより実現される。   The image processing apparatus main body 10 is configured by a general-purpose computer system having, for example, a processor, a memory, and the like, and each component or function described below executes, for example, a predetermined computer program on the computer system. It is realized by.

画像処理装置本体10は、同図に示すように、前処理部11と、顔面抽出部13と、顔パーツ抽出部15と、マスク生成処理部17と、肌解析処理部19と、原画像データ記憶部300と、グレー画像データ記憶部311と、色相画像データ記憶部312と、G比率画像データ記憶部313と、R比率画像データ記憶部314と、微分画像データ記憶部315と、顔面領域データ記憶部350と、唇領域データ記憶部360と、目・眉領域データ記憶部370と、鼻孔領域データ記憶部380と、マスク領域データ記憶部390とを備える。   As shown in the figure, the image processing apparatus body 10 includes a preprocessing unit 11, a face extraction unit 13, a face part extraction unit 15, a mask generation processing unit 17, a skin analysis processing unit 19, and original image data. Storage unit 300, gray image data storage unit 311, hue image data storage unit 312, G ratio image data storage unit 313, R ratio image data storage unit 314, differential image data storage unit 315, and facial area data A storage unit 350, a lip region data storage unit 360, an eye / brow region data storage unit 370, a nostril region data storage unit 380, and a mask region data storage unit 390 are provided.

原画像データ記憶部300には、被験者(人物)の顔を含む画像が保存される。原画像データ記憶部300に保存される原画像の画像データ(以下、原画像データという)は、例えば、カメラ5で撮影された画像のデータでも良いし、カメラ5以外のカメラで撮影された画像のデータであっても良い。   The original image data storage unit 300 stores an image including the face of the subject (person). The image data of the original image (hereinafter referred to as original image data) stored in the original image data storage unit 300 may be, for example, image data captured by the camera 5 or an image captured by a camera other than the camera 5. May be the data.

原画像は、例えば、黒い背景で、顔を含む被験者の首から上の部分を正面から撮影した静止画像である。被験者の着ている服が映らないように、黒色の前掛けをつけて撮影された画像でも良い。原画像には、主に被験者の顔面及び頭髪が写っている。原画像は、被験者を左または右斜め前方から撮影した画像でも良い。原画像に写っている被験者の顔の向きが、原画像データ記憶部300に保存されている原画像データのファイル名で識別できるようにファイル名を定めても良い。原画像は、顔面の肌の露出が多くなるように、前髪を持ち上げた状態で撮影された画像でも良い。   The original image is, for example, a still image obtained by photographing the upper part of the subject including the face from the front with a black background. An image taken with a black apron may be used so that the subject's clothes are not reflected. The original image mainly shows the face and hair of the subject. The original image may be an image of the subject taken from the left or diagonally right. The file name may be determined so that the orientation of the face of the subject in the original image can be identified by the file name of the original image data stored in the original image data storage unit 300. The original image may be an image taken with the bangs raised so that facial skin exposure is increased.

原画像の画素数は、例えば、水平方向(X方向)及び垂直方向(Y方向)ともに2000〜5000画素程度を有する2次元の画像で良い。原画像は、例えば、画素ごとにRGB(赤、緑、青)の各成分を有するカラー画像である。原画像は、動画像の1フレームであっても良い。   The number of pixels of the original image may be, for example, a two-dimensional image having about 2000 to 5000 pixels in both the horizontal direction (X direction) and the vertical direction (Y direction). The original image is a color image having RGB (red, green, blue) components for each pixel, for example. The original image may be one frame of a moving image.

前処理部11は、原画像データ記憶部300に保存されている原画像データを種々の方法で加工する。前処理部11は、グレー画像生成部111と、色相画像生成部113と、G比率画像生成部115と、R比率画像生成部117と、微分画像生成部119とを有する。   The preprocessing unit 11 processes the original image data stored in the original image data storage unit 300 by various methods. The preprocessing unit 11 includes a gray image generation unit 111, a hue image generation unit 113, a G ratio image generation unit 115, an R ratio image generation unit 117, and a differential image generation unit 119.

グレー画像生成部111は、原画像からグレースケール画像を生成する。グレー画像生成部111は、原画像データ記憶部300から原画像データを読み出し、公知のグレースケール変換式を用いて、原画像からグレースケール画像を生成しても良い。グレー画像生成部111が生成したグレースケール画像の画像データ(以下、グレースケール画像データという)は、グレー画像データ記憶部311に保存される。   The gray image generation unit 111 generates a grayscale image from the original image. The gray image generation unit 111 may read the original image data from the original image data storage unit 300 and generate a gray scale image from the original image using a known gray scale conversion formula. Image data of a grayscale image generated by the gray image generation unit 111 (hereinafter referred to as grayscale image data) is stored in the gray image data storage unit 311.

色相画像生成部113は、原画像から各画素が色相を示す色相画像を生成する。色相画像生成部113は、原画像データ記憶部300から原画像データを読み出し、以下に示すRGBから色相(H:Hue)への変換式により、原画像から色相画像を生成しても良い。色相画像生成部113が生成した色相画像の画像データ(以下、色相画像データという)は色相画像データ記憶部312に保存される。   The hue image generation unit 113 generates a hue image in which each pixel indicates a hue from the original image. The hue image generation unit 113 may read the original image data from the original image data storage unit 300 and generate a hue image from the original image according to the following conversion formula from RGB to hue (H: Hue). Image data of the hue image generated by the hue image generation unit 113 (hereinafter referred to as hue image data) is stored in the hue image data storage unit 312.

Figure 0006058722
H:色相
R,G,Bはそれぞれ赤、緑及び青の画素値
Figure 0006058722
H: Hue R, G, and B are pixel values of red, green, and blue, respectively

G比率画像生成部115は、原画像の各画素をG(緑)成分で正規化して、G(緑)成分の比率を示すG比率画像を生成する。G比率画像生成部115は、原画像データ記憶部300から原画像データを読み出し、以下の式(2)に示すRGBからG成分比率(G比率)への変換式を各画素に適用し、原画像からG比率画像を生成しても良い。G比率画像生成部115が生成したG比率画像の画像データ(以下、G比率画像データという)はG比率画像データ記憶部313に保存される。   The G ratio image generation unit 115 normalizes each pixel of the original image with a G (green) component, and generates a G ratio image indicating the ratio of the G (green) component. The G ratio image generation unit 115 reads the original image data from the original image data storage unit 300, applies a conversion formula from RGB to G component ratio (G ratio) shown in the following formula (2) to each pixel, and A G ratio image may be generated from the image. Image data of the G ratio image generated by the G ratio image generation unit 115 (hereinafter referred to as G ratio image data) is stored in the G ratio image data storage unit 313.

G比率=G/(R+G+B) ・・・(2)   G ratio = G / (R + G + B) (2)

R比率画像生成部117は、原画像の各画素をR(赤)成分で正規化して、R(赤)成分の比率を示すR比率画像を生成する。R比率画像生成部117は、原画像データ記憶部300から原画像データを読み出し、以下の式(3)に示すRGBからR成分比率(R比率)への変換式を各画素に適用し、原画像からR比率画像を生成しても良い。R比率画像生成部117が生成したR比率画像の画像データ(以下、R比率画像データという)はR比率画像データ記憶部314に保存される。   The R ratio image generation unit 117 normalizes each pixel of the original image with the R (red) component, and generates an R ratio image indicating the ratio of the R (red) component. The R ratio image generation unit 117 reads the original image data from the original image data storage unit 300, applies the conversion formula from RGB to R component ratio (R ratio) shown in the following formula (3) to each pixel, and An R ratio image may be generated from the image. Image data of the R ratio image generated by the R ratio image generation unit 117 (hereinafter referred to as R ratio image data) is stored in the R ratio image data storage unit 314.

R比率=R/(R+G+B) ・・・(3)   R ratio = R / (R + G + B) (3)

微分画像生成部119は、原画像を微分した微分画像を生成する。微分画像生成部119は、原画像データ記憶部300から原画像データを読み出し、例えば、水平方向または垂直方向へゾーベル(Sobel)フィルタあるいはプレヴィット(Prewitt)フィルタを適用して、原画像から微分画像を生成しても良い。微分画像生成部119が生成した微分画像の画像データ(以下、微分画像データという)は微分画像データ記憶部315に保存される。   The differential image generation unit 119 generates a differential image obtained by differentiating the original image. The differential image generation unit 119 reads the original image data from the original image data storage unit 300, and applies a Sobel filter or a Prewitt filter in the horizontal direction or the vertical direction, for example, to differentiate the original image from the original image. May be generated. Image data of the differential image generated by the differential image generation unit 119 (hereinafter referred to as differential image data) is stored in the differential image data storage unit 315.

顔面抽出部13は、原画像に含まれる顔面の領域を抽出する。顔面抽出部13は、原画像で明度及び色相が所定範囲内の画素を抽出して、被験者の顔面領域として特定しても良い。顔面抽出部13は、例えば、グレー画像データ記憶部311及び色相画像データ記憶部312に保存されているグレースケール画像及び色相画像データに応じて顔面領域を特定し、顔面領域を示す顔面領域データを生成する。顔面領域データは顔面領域データ記憶部350に保存される。顔面抽出部13による処理の詳細については後述する。   The face extraction unit 13 extracts a face area included in the original image. The face extraction unit 13 may extract a pixel whose brightness and hue are within a predetermined range from the original image and specify it as the face area of the subject. For example, the face extraction unit 13 specifies a face region according to the grayscale image and the hue image data stored in the gray image data storage unit 311 and the hue image data storage unit 312, and uses the facial region data indicating the face region. Generate. The face area data is stored in the face area data storage unit 350. Details of the processing by the face extraction unit 13 will be described later.

顔パーツ抽出部15は、顔面領域に含まれる顔のパーツの領域を抽出する。本実施形態では、顔パーツ抽出部15は、顔のパーツとして眉、閉じた目(以下、単に目ということもある)、鼻孔、及び唇を抽出する。従って、顔パーツ抽出部15は、唇抽出部151と、目・眉抽出部153と、鼻孔抽出部155とを有する。   The face part extracting unit 15 extracts a face part area included in the face area. In the present embodiment, the face part extraction unit 15 extracts eyebrows, closed eyes (hereinafter sometimes simply referred to as eyes), nostrils, and lips as face parts. Therefore, the face part extraction unit 15 includes a lip extraction unit 151, an eye / brow extraction unit 153, and a nostril extraction unit 155.

唇抽出部151は、顔面領域から色成分に応じて被験者の唇領域を抽出する。唇抽出部151は、例えば、原画像のG(緑)成分に応じて唇領域を特定しても良いし、色相に応じて唇領域を特定しても良い。唇抽出部151は、原画像のG(緑)成分の比率が所定範囲内の画素を抽出して唇領域として、唇領域の範囲を示す唇領域データを生成しても良い。唇領域データは、唇領域データ記憶部360に保存される。唇抽出部151による処理の詳細については後述する。   The lip extraction unit 151 extracts the lip region of the subject from the face region according to the color component. For example, the lip extraction unit 151 may specify the lip region according to the G (green) component of the original image, or may specify the lip region according to the hue. The lip extraction unit 151 may generate lip region data indicating the range of the lip region by extracting pixels in which the ratio of the G (green) component of the original image is within a predetermined range as a lip region. The lip area data is stored in the lip area data storage unit 360. Details of the processing by the lip extraction unit 151 will be described later.

目・眉抽出部153は、顔面領域から明度及び色成分に応じて、被験者の目領域及び眉領域を抽出する。目・眉抽出部153は、例えば、原画像を微分した微分画像または原画像をグレースケール化したグレースケール画像の画像データに応じて、前記顔面領域内の眉を含む眉領域を特定し、眉領域の範囲を示す眉領域データを生成する。また、目・眉抽出部153は、例えば、原画像で明度が所定範囲内の画素を抽出して、顔面領域内の閉じた目を含む目領域を特定し、目領域の範囲を示す目領域データを生成する。目領域データ及び眉領域データは、目・眉領域データ記憶部370に保存される。目・眉抽出部153による処理の詳細については後述する。   The eye / brow extraction unit 153 extracts the eye region and the eyebrow region of the subject from the face region according to the brightness and the color component. For example, the eye / brow extraction unit 153 identifies an eyebrow region including the eyebrow in the face region according to image data of a differential image obtained by differentiating the original image or a grayscale image obtained by converting the original image to grayscale. Eyebrow area data indicating the area range is generated. In addition, the eye / brow extraction unit 153, for example, extracts pixels whose brightness is in a predetermined range from the original image, specifies an eye region including a closed eye in the face region, and shows an eye region range. Generate data. The eye area data and the eyebrow area data are stored in the eye / brow area data storage unit 370. Details of the processing by the eye / brow extraction unit 153 will be described later.

鼻孔抽出部155は、顔面領域から明度及び/または色成分に応じて被験者の鼻孔領域を抽出する。鼻孔抽出部155は、例えば、顔面領域から唇、目及び眉の各領域の全部または一部を除去した領域内でグレースケール画像の画像データに応じた領域を新たに生成し、R(赤)成分に応じて鼻孔を含む鼻孔領域を特定する。鼻孔抽出部155は、原画像のR(赤)成分の比率が所定範囲内の画素を抽出して鼻孔領域として、鼻孔領域を示す鼻孔領域データを生成しても良い。あるいは、鼻孔抽出部155は、グレースケール画像から抽出した領域で鼻孔領域を特定しても良いし、R比率画像から抽出した領域で鼻孔領域を特定しても良い。鼻孔領域データは鼻孔領域データ記憶部380に保存される。鼻孔抽出部155による処理の詳細については後述する。   The nostril extraction unit 155 extracts the nostril region of the subject from the face region according to the lightness and / or color component. For example, the nostril extraction unit 155 newly generates a region corresponding to the image data of the grayscale image within a region obtained by removing all or part of the lip, eye, and eyebrow regions from the face region, and R (red) A nostril region including the nostril is identified according to the component. The nostril extraction unit 155 may generate nostril region data indicating the nostril region as a nostril region by extracting pixels in which the ratio of the R (red) component of the original image is within a predetermined range. Alternatively, the nostril extraction unit 155 may specify the nostril region from the region extracted from the grayscale image, or may specify the nostril region from the region extracted from the R ratio image. The nostril region data is stored in the nostril region data storage unit 380. Details of the processing by the nostril extraction unit 155 will be described later.

マスク生成処理部17は、肌解析処理部19が行う解析の対象となる肌領域を抽出するためのマスクを生成する。マスク生成処理部17が生成するマスクは、顔面領域から眉、目、鼻孔及び唇の各パーツの少なくとも一つ以上の領域をマスクする。つまり、マスク生成処理部17が生成するマスクにより、顔面のパーツの少なくとも一部が取り除かれた肌領域が特定される。マスク生成処理部17は、眉領域データ、目領域データ、鼻孔領域データ及び唇領域データが示す領域を顔面領域が示す領域から除去したマスクデータを生成する。マスクデータは、マスク領域データ記憶部390に保存される。なお、マスク生成処理部17がマスクをする顔パーツの領域の一部は、本実施形態とは異なる手法で特定された領域を用いても良い。   The mask generation processing unit 17 generates a mask for extracting a skin region to be analyzed by the skin analysis processing unit 19. The mask generated by the mask generation processing unit 17 masks at least one area of each part of the eyebrows, eyes, nostrils, and lips from the face area. That is, the skin region from which at least a part of the facial parts is removed is specified by the mask generated by the mask generation processing unit 17. The mask generation processing unit 17 generates mask data obtained by removing the area indicated by the eyebrow area data, the eye area data, the nostril area data, and the lip area data from the area indicated by the face area. The mask data is stored in the mask area data storage unit 390. Note that a part specified by a method different from the present embodiment may be used as a part of the face part area masked by the mask generation processing unit 17.

また、本実施形態では、顔パーツ抽出部15が、眉、目、鼻孔及び唇の各領域を抽出して、マスク生成処理部17が各領域をマスクするマスクデータを生成するが、必ずしもすべての領域を同時にマスクしなくても良い。例えば、マスク生成処理部17は、眉、目、鼻孔及び唇の各領域の一つ以上の領域をマスクするマスクデータを生成しても良い。その場合、顔パーツ抽出部15は、必要な領域のみを抽出し、必要でない領域の抽出を省略しても良い。   In this embodiment, the face part extraction unit 15 extracts each region of the eyebrows, eyes, nostrils, and lips, and the mask generation processing unit 17 generates mask data for masking each region. It is not necessary to mask the region at the same time. For example, the mask generation processing unit 17 may generate mask data that masks one or more of the eyebrow, eye, nostril, and lip areas. In that case, the face part extraction unit 15 may extract only a necessary region and omit unnecessary region extraction.

肌解析処理部19は、肌領域の原画像データに応じて、被験者の肌の状態を解析する。例えば、肌解析処理部19は、マスク領域データ記憶部390に保存されたマスクデータに基づいて肌領域の画素を特定し、その肌領域の画素の原画像データを用いて、肌解析を行う。肌解析の結果は、図示しない出力装置(ディスプレイ、プリンタ等)から所定の形式で出力される。   The skin analysis processing unit 19 analyzes the skin condition of the subject according to the original image data of the skin region. For example, the skin analysis processing unit 19 specifies a skin region pixel based on the mask data stored in the mask region data storage unit 390, and performs skin analysis using the original image data of the skin region pixel. The result of skin analysis is output in a predetermined format from an output device (display, printer, etc.) not shown.

図2は、本実施形態の画像処理装置1の全体処理手順を示す。   FIG. 2 shows an overall processing procedure of the image processing apparatus 1 of the present embodiment.

まず、画像処理装置本体10が原画像データを取り込んで原画像データ記憶部300に保存する(S210)。   First, the image processing apparatus body 10 captures original image data and stores it in the original image data storage unit 300 (S210).

前処理部11が、以降の処理で必要となる画像を予め生成する(S220)。具体的には、前処理部11がグレースケール画像、色相画像、G比率画像、R比率画像及び微分画像をそれぞれ生成する。なお、これらの画像はステップS230の処理を開始する前にすべて生成されている必要はない。各画像はステップS230以降でそれぞれ必要になるときまでに生成されていれば良い。   The preprocessing unit 11 generates in advance an image necessary for the subsequent processing (S220). Specifically, the preprocessing unit 11 generates a gray scale image, a hue image, a G ratio image, an R ratio image, and a differential image, respectively. Note that these images need not all be generated before starting the process of step S230. Each image may be generated by the time it becomes necessary after step S230.

顔面抽出部13は、原画像から背景領域及び頭髪等の領域を除去した顔面領域を抽出して、顔面領域データを生成する(S230)。   The face extraction unit 13 extracts a face area from which an area such as a background area and hair is removed from the original image, and generates face area data (S230).

唇抽出部151は、顔面領域から唇領域を抽出して、唇領域データを生成する(S240)。   The lip extraction unit 151 extracts lip areas from the face area and generates lip area data (S240).

目・眉抽出部153は、顔面領域から目領域及び眉領域を抽出して、目領域データ及び眉領域データを生成する(S250)。   The eye / brow extraction unit 153 extracts the eye region and the eyebrow region from the face region, and generates eye region data and eyebrow region data (S250).

鼻孔抽出部155は、顔面領域から鼻孔領域を抽出して、鼻孔領域データを生成する(S260)。   The nostril extraction unit 155 extracts the nostril area from the face area and generates nostril area data (S260).

マスク生成処理部17は、ステップS230〜260までの処理結果に応じて、原画像から肌領域を抽出するためのマスクデータを生成する(S270)。   The mask generation processing unit 17 generates mask data for extracting a skin region from the original image according to the processing results of steps S230 to S260 (S270).

肌解析処理部19は、マスクデータにより特定される肌領域について、原画像データに基づいて肌解析処理を行う(S280)。   The skin analysis processing unit 19 performs skin analysis processing on the skin area specified by the mask data based on the original image data (S280).

図3は、ステップS230の顔面領域抽出処理の詳細な処理手順を示すフローチャートである。   FIG. 3 is a flowchart showing a detailed processing procedure of the facial area extraction processing in step S230.

顔面抽出部13は、グレースケール画像に応じて、それを2値化するための閾値を決定する(S31)。例えば、グレースケール画像の画素値の分布に応じて第1の範囲を定める。さらに詳細には、例えば、顔面抽出部13は、グレースケール画像データをグレー画像データ記憶部311から読み込んで、ヒストグラムを生成する。顔面抽出部13は、このヒストグラムに基づいて、2値化のための閾値を決定しても良い。   The face extraction unit 13 determines a threshold value for binarizing the gray scale image according to the gray scale image (S31). For example, the first range is determined according to the distribution of pixel values of the grayscale image. More specifically, for example, the face extraction unit 13 reads grayscale image data from the gray image data storage unit 311 and generates a histogram. The face extraction unit 13 may determine a threshold for binarization based on this histogram.

図4Aは、グレースケール画像のヒストグラムの一例を示す。同図に示すヒストグラムは、一つの典型例であり2つのピークを有するが、ピークが3つ以上になる場合もある。各ピークは、暗い方から、主に背景領域(黒)と人の顔領域とに対応する。3つピークが現れる場合は、例えば、被験者の頭部が明るい色(白髪、金髪等の頭髪、及び頭巾等の冠りものをつけているとき等)である場合がある。このときは、背景よりもさらに明るいピークが現れる。そこで、顔面抽出部13は、最も暗いピークを超えた最初の谷の画素値aを2値化の閾値としても良い。そして、この閾値を境にグレースケール画像を2値化する。閾値aよりも大きい画素値の範囲が第1の範囲となる。   FIG. 4A shows an example of a histogram of a grayscale image. The histogram shown in the figure is one typical example and has two peaks, but there may be three or more peaks. Each peak mainly corresponds to a background area (black) and a human face area from the dark side. When three peaks appear, for example, the subject's head may be a bright color (such as when wearing a crown, such as white hair, blond hair, and a hood). At this time, a peak brighter than the background appears. Therefore, the face extraction unit 13 may set the pixel value a of the first valley that exceeds the darkest peak as a binarization threshold. Then, the grayscale image is binarized with this threshold as a boundary. A range of pixel values larger than the threshold value a is the first range.

図3に戻ると、顔面抽出部13は、色相画像に応じて、それを2値化するための閾値を決定する(S33)。例えば、顔面抽出部13は、色相画像の画素値の分布に応じて第2の範囲を定める。さらに詳細には、例えば、顔面抽出部13は、色相画像の画像データを色相画像データ記憶部312から読み込んで、ヒストグラムを生成する。このヒストグラムに基づいて、2値化のための閾値を決定する。色相の値は0−359までであるが、0−255までに変換しても良い。   Returning to FIG. 3, the face extraction unit 13 determines a threshold value for binarizing the hue image according to the hue image (S33). For example, the face extraction unit 13 determines the second range according to the distribution of pixel values of the hue image. More specifically, for example, the face extraction unit 13 reads the image data of the hue image from the hue image data storage unit 312 and generates a histogram. Based on this histogram, a threshold for binarization is determined. The hue value is 0 to 359, but may be converted to 0 to 255.

図4Bは、色相画像のヒストグラムの一例を示す。同図に示すヒストグラムは、一つの典型例であり2つのピークを有するが、3つ以上になる場合もある。3つピークが現れる場合は、前記グレースケール画像のヒストグラムと同様の場合である。顔面抽出部13は、例えば、最大のピークを含む所定の画素値の範囲(下限閾値をb、上限閾値をc)を定める。画素値b〜cの範囲を第2の範囲としても良い。   FIG. 4B shows an example of a histogram of the hue image. The histogram shown in the figure is one typical example and has two peaks, but may be three or more. The case where three peaks appear is the same case as the histogram of the gray scale image. For example, the face extraction unit 13 determines a range of predetermined pixel values including the maximum peak (the lower limit threshold is b and the upper limit threshold is c). The range of the pixel values b to c may be set as the second range.

なお、色相画像のヒストグラムは、すべての画素を対象として生成されたものでも良いし、グレースケール画像において閾値a以上の画素値を有する画素を対象にして生成されたものでも良い。   Note that the histogram of the hue image may be generated for all the pixels, or may be generated for a pixel having a pixel value equal to or higher than the threshold value a in the grayscale image.

顔面抽出部13は、グレースケール画像の画素値がa以上(第1の範囲内)であり、かつ、色相画像の画素値がbからcの間(第2の範囲内)の画素を顔面候補領域として特定する(S35)。   The face extraction unit 13 selects a pixel whose pixel value of the grayscale image is a or more (within the first range) and whose pixel value of the hue image is between b and c (within the second range) as a face candidate. The area is specified (S35).

顔面抽出部13は、ステップS35で特定された顔面候補領域に対して、例えばスネーク処理等の輪郭修正処理を行って顔面領域を決定する(S37)。   The face extraction unit 13 performs a contour correction process such as a snake process on the face candidate area specified in step S35 to determine a face area (S37).

図5は、ステップS240の唇抽出処理の詳細な処理手順を示すフローチャートである。   FIG. 5 is a flowchart showing a detailed processing procedure of the lip extraction processing in step S240.

唇抽出部151は、G比率画像に応じて、それを2値化するための閾値を決定する(S511)。例えば、唇抽出部151は、G比率画像の画素値の分布に応じて第3の範囲を定める。さらに詳細には、例えば、唇抽出部151は、G比率画像の画像データをG比率画像データ記憶部313から読み込んで、ヒストグラムを生成する。このヒストグラムに基づいて、2値化のための閾値を決定しても良い。さらに、最大のピークのときの画素値dを基準として閾値を定めても良い。例えば、画素値dの1/2、1/3、1/5、1/10等の画素値を閾値としても良い。   The lip extraction unit 151 determines a threshold value for binarizing the G ratio image according to the G ratio image (S511). For example, the lip extraction unit 151 determines the third range according to the distribution of pixel values of the G ratio image. More specifically, for example, the lip extraction unit 151 reads the image data of the G ratio image from the G ratio image data storage unit 313 and generates a histogram. Based on this histogram, a threshold value for binarization may be determined. Further, the threshold value may be determined based on the pixel value d at the maximum peak. For example, pixel values such as 1/2, 1/3, 1/5, and 1/10 of the pixel value d may be used as the threshold value.

唇抽出部151は、ステップS511で特定した閾値に基づいてG比率画像を2値化する(S513)。ここでは、着目している領域(以下、特徴領域と呼ぶ)を白、その他の領域を黒に2値化する。唇抽出部151は、この2値化画像に対してノイズ除去処理を行っても良い。ノイズ除去処理として、唇抽出部151は、例えば、2値化画像で孤立している、面積の小さい特徴領域をノイズとし、これを除去するためのフィルタをかけても良い。なお、これ以降に説明する他の処理でも2値化処理を行う場合がある。2値化処理では、特に言及しないときでも上述したノイズ除去処理を実行しても良い。   The lip extraction unit 151 binarizes the G ratio image based on the threshold specified in step S511 (S513). Here, the region of interest (hereinafter referred to as a feature region) is binarized to white, and the other regions are binarized to black. The lip extraction unit 151 may perform noise removal processing on the binarized image. As the noise removal processing, for example, the lip extraction unit 151 may use a feature area that is isolated in a binarized image and has a small area as noise, and may apply a filter for removing the noise. Note that the binarization process may be performed in other processes described below. In the binarization process, the noise removal process described above may be executed even when not specifically mentioned.

また、ここではG比率画像を用いているが、G比率画像の代わりに色相画像を用いても良い。色相画像を用いる場合、まず、唇抽出部151は、グレースケール画像で所定以上の明度を有する画素を対象として色相画像を生成する。そして、唇抽出部151は、色相画像において、所定の色相範囲に属する画素の原画像での空間分布に基づいて(例えば、顔の下側に位置する所定面積の範囲に属する領域等を)唇領域として特定しても良い。   Although a G ratio image is used here, a hue image may be used instead of the G ratio image. When using a hue image, first, the lip extraction unit 151 generates a hue image for a pixel having a predetermined brightness or more in a grayscale image. The lip extraction unit 151 then extracts the lips in the hue image based on the spatial distribution in the original image of the pixels belonging to the predetermined hue range (for example, the region belonging to the predetermined area range located below the face). It may be specified as a region.

次に、唇抽出部151は、この2値化画像に対して二通りの処理を実行する。   Next, the lip extraction unit 151 performs two types of processing on the binarized image.

まず、唇抽出部151は、G比率画像または色相画像の画素値が第3の範囲内である画素を含む領域を第1唇候補領域としても良い。具体的には、唇抽出部151が次に説明するステップS515及びS517を行って第1唇候補領域を特定しても良い。   First, the lip extraction unit 151 may set a region including pixels whose pixel values of the G ratio image or the hue image are within the third range as the first lip candidate region. Specifically, the lip extraction unit 151 may specify the first lip candidate region by performing steps S515 and S517 described below.

唇抽出部151は、顔面領域の縁部分にあるノイズを除去する処理(以下、縁処理という)を行う(S515)。   The lip extraction unit 151 performs a process for removing noise at the edge portion of the face area (hereinafter referred to as edge process) (S515).

顔面領域の縁部分では、頭髪や顔の輪郭に沿う影等のノイズの影響により誤抽出が生じやすい。そこで、本実施形態では、顔面領域の輪郭を形成する閉曲線とこの輪郭をわずかに縮小した閉曲線との間の環状領域と、これに繋がる特徴領域を除去する。ただし、ここで除去対象となる特徴領域は、必ずしもノイズでない場合もある。そこで、本実施形態では、以下に説明する他の処理においても、必要に応じて縁処理を実行したり、しなかったりする。   At the edge of the face area, erroneous extraction is likely to occur due to the influence of noise such as shadows along the hair and the outline of the face. Therefore, in this embodiment, the annular region between the closed curve forming the contour of the facial region and the closed curve obtained by slightly reducing the contour, and the feature region connected thereto are removed. However, the feature region to be removed here is not necessarily noise. Therefore, in this embodiment, edge processing is performed or not performed as necessary in other processing described below.

唇抽出部151は、縁処理が実行された後の2値化画像で特徴領域とされた領域を第1唇候補領域とする(S517)。   The lip extraction unit 151 sets a region defined as a feature region in the binarized image after the edge processing is performed as a first lip candidate region (S517).

これに対して、唇抽出部151は、さらに、ステップS513で2値化された画像に対してマリオネットライン除去処理(シワ消し処理)を適用し、残った画素を含む領域を第2唇候補領域とする。具体的には、唇抽出部151が次に説明するステップS519〜S523を行って第2唇候補領域を特定する。   In response to this, the lip extraction unit 151 further applies marionette line removal processing (wrinkle removal processing) to the image binarized in step S513, and sets the region including the remaining pixels as the second lip candidate. This is an area. Specifically, the lip extraction unit 151 performs steps S519 to S523 described below to specify the second lip candidate region.

唇抽出部151は、2値化画像においてマリオネットライン除去処理を行う(S519)。マリオネットラインとは、口の両脇からあごに伸びる2本の線のことである。このマリオネットラインを消去するために、唇抽出部151は、例えば、2値化画像の全領域を対象に頭髪やシワ等の細い線を除去するためのフィルタ処理を実行しても良い。なお、これ以降に説明する他の2値化画像に対しても、特に言及しないときでもこの処理をノイズ除去処理として実行しても良い。   The lip extraction unit 151 performs marionette line removal processing on the binarized image (S519). A marionette line is two lines that extend from both sides of the mouth to the chin. In order to erase the marionette line, the lip extraction unit 151 may execute a filter process for removing thin lines such as hair and wrinkles on the entire area of the binarized image, for example. It should be noted that this process may be executed as a noise removal process for other binarized images described below even when not specifically mentioned.

唇抽出部151は、マリオネットライン除去処理後の2値化画像に対して、ステップS515と同じ縁処理を適用する(S521)。   The lip extraction unit 151 applies the same edge process as in step S515 to the binarized image after the marionette line removal process (S521).

唇抽出部151は、ステップS521が実行された後の2値化画像で特徴領域とされた領域を第2唇候補領域とする(S523)。   The lip extraction unit 151 sets a region defined as a feature region in the binarized image after step S521 is executed as a second lip candidate region (S523).

唇抽出部151は、第1唇候補領域の決定と第2唇候補領域の決定の何れを先に実行しても良い。   The lip extraction unit 151 may execute either the determination of the first lip candidate region or the determination of the second lip candidate region first.

唇抽出部151は、第1唇候補領域及び第2唇候補領域の何れか一方を唇領域として特定する(S525)。ここでは、第1唇候補領域の下端の位置と第2唇候補領域の下端の位置を比較して、より低い位置にある唇候補領域を唇領域として選択するようにしても良い。   The lip extraction unit 151 identifies one of the first lip candidate region and the second lip candidate region as a lip region (S525). Here, the position of the lower end of the first lip candidate area may be compared with the position of the lower end of the second lip candidate area, and the lower lip candidate area may be selected as the lip area.

唇抽出部151は、顔面領域内での唇領域の位置によって顔の向きを判定する(S527)。例えば、唇抽出部151は、顔面領域の横幅(X方向の長さ)を3等分し、唇領域が左側面、右側面、中心の何れの領域に最も多く属しているかによって、顔の向きを判定しても良い。例えば、唇領域が顔の中心に最も多く存在するときは、正面向きであると判定する。なお、この判定結果に応じて、原画像データ記憶部300に保存されている原画像データのファイル名を決定しても良い。例えば、原画像データのファイル名を顔の向きが識別可能なファイル名としても良い。   The lip extraction unit 151 determines the orientation of the face based on the position of the lip area in the face area (S527). For example, the lip extraction unit 151 divides the width of the face area (length in the X direction) into three equal parts, and the orientation of the face depends on whether the lip area belongs most to the left side, right side, or center area. May be determined. For example, when the lip area is present most frequently in the center of the face, it is determined that the face is facing forward. Note that the file name of the original image data stored in the original image data storage unit 300 may be determined according to the determination result. For example, the file name of the original image data may be a file name whose face orientation can be identified.

図6〜図10は、目・眉抽出部153が行う目領域及び眉領域の抽出を行う目・眉処理のフローチャートである。目・眉抽出部153は、唇領域が既に抽出されているときは、唇領域上端よりも下の領域を処理対象外とし、唇領域の上端よりも上の顔面領域を目・眉処理の対象領域として目及び眉領域を抽出する処理を行っても良い。   6 to 10 are flowcharts of the eye / eyebrow processing for extracting the eye region and the eyebrow region performed by the eye / brow extraction unit 153. When the lip region has already been extracted, the eye / brow extraction unit 153 excludes the region below the upper end of the lip region from the processing target, and the face region above the upper end of the lip region as the target for the eye / brow processing. You may perform the process which extracts eyes and an eyebrow area | region as an area | region.

図6は、目領域及び眉領域を抽出する処理の全体を示すフローチャートである。   FIG. 6 is a flowchart illustrating the entire process of extracting the eye area and the eyebrow area.

目・眉抽出部153は、まず、顔面領域の中の閉じた目を抽出する目抽出処理を実行する(S611)。目抽出処理の詳細については後述する。   The eye / eyebrow extraction unit 153 first executes an eye extraction process for extracting a closed eye in the face region (S611). Details of the eye extraction process will be described later.

目・眉抽出部153は、目抽出処理の後に眉抽出処理を実行する(S613)。眉抽出処理の詳細については後述する。   The eye / eyebrow extraction unit 153 executes the eyebrow extraction process after the eye extraction process (S613). Details of the eyebrow extraction process will be described later.

目・眉抽出部153は、目抽出処理及び眉抽出処理の処理で、目領域及び眉領域が抽出されたか否かを判定する(S615)。   The eye / brow extraction unit 153 determines whether or not the eye region and the eyebrow region are extracted in the eye extraction process and the eyebrow extraction process (S615).

ここで、目領域及び眉領域の両方が抽出されていた場合、眉領域と目領域の相対的な位置関係が正常であるか否かを判定する(S621)。ここで、眉領域が目領域よりも上に位置する場合、相対的な位置関係が正しいので、終了する。一方、眉領域が目領域よりも上に位置する場合、相対的な位置関係が正しくないので、この時点で抽出されている目領域及び眉領域を破棄し、ステップS611へ戻り再処理を実行する。   Here, if both the eye area and the eyebrow area have been extracted, it is determined whether or not the relative positional relationship between the eyebrow area and the eye area is normal (S621). Here, when the eyebrow area is located above the eye area, the relative positional relationship is correct, and the process is terminated. On the other hand, when the eyebrow region is located above the eye region, the relative positional relationship is not correct. Therefore, the eye region and eyebrow region extracted at this time are discarded, and the process returns to step S611 to execute reprocessing. .

このときのように、図6に示す処理では、目抽出処理が複数回実行される可能性がある。目抽出処理の詳細な処理フローは図7に示す通りである。但し、目・眉抽出部153は、目抽出処理を実行する回数に応じて、一以上のパラメータを変えて実行する。例えば、目・眉抽出部153は、2値化の閾値、ノイズとして除去する特徴領域のサイズ、及び縁処理を適用するか否か等を、処理を実行する回数に応じて変えて行っても良い。これにより、目抽出処理を実行するごとに異なる目領域が抽出されることになる。   As in this case, in the process shown in FIG. 6, the eye extraction process may be executed a plurality of times. A detailed processing flow of the eye extraction processing is as shown in FIG. However, the eye / eyebrow extraction unit 153 changes one or more parameters for execution according to the number of times the eye extraction process is executed. For example, the eye / eyebrow extraction unit 153 may change the threshold value for binarization, the size of the feature region to be removed as noise, whether or not to apply edge processing, and the like depending on the number of times the processing is performed. good. Thereby, a different eye region is extracted every time the eye extraction process is executed.

また、図6に示す処理では、眉抽出処理も目抽出処理と同様に複数回実行される可能性がある。眉抽出処理の詳細な処理フローは図8〜図10に示す通りである。但し、目・眉抽出部153は、眉抽出処理についても、目抽出処理と同様に実行する回数に応じて、一以上のパラメータを変えて実行する。例えば、目・眉抽出部153は、2値化の閾値、ノイズとして除去する特徴領域のサイズ、及び縁処理を適用するか否か等を、処理を実行する回数に応じて変えて行う。これにより、眉抽出処理を実行するごとに異なる眉領域が抽出されることになる。   Further, in the process shown in FIG. 6, the eyebrow extraction process may be executed a plurality of times in the same manner as the eye extraction process. The detailed processing flow of the eyebrow extraction process is as shown in FIGS. However, the eye / eyebrow extraction unit 153 also executes the eyebrow extraction process while changing one or more parameters according to the number of times of execution similar to the eye extraction process. For example, the eye / brow extraction unit 153 changes the threshold for binarization, the size of the feature region to be removed as noise, whether to apply edge processing, and the like according to the number of times the processing is executed. Thereby, a different eyebrow region is extracted every time the eyebrow extraction process is executed.

ステップS615で眉領域のみが抽出されていたと判定されたときは、目・眉抽出部153は、再び目抽出処理を実行する(S631)。その後、目・眉抽出部153は、目領域が抽出されたか否かを判定する(S633)。ここでは、目領域が抽出されるまでステップS631の処理を繰り返す。   When it is determined in step S615 that only the eyebrow region has been extracted, the eye / eyebrow extraction unit 153 executes the eye extraction process again (S631). Thereafter, the eye / eyebrow extraction unit 153 determines whether an eye region has been extracted (S633). Here, the process of step S631 is repeated until the eye region is extracted.

ステップS615で目領域及び眉領域の何れも抽出されていなかったと判定されたときは、目・眉抽出部153は、眉抽出処理を実行した後、目抽出処理を実行する(S641、S643)。その後、目・眉抽出部153は、ステップS641及びS643で眉領域及び目領域が抽出されたか否かを判定する(S645)。ここでは、眉領域と目領域の一方のみを抽出した場合には、眉領域及び目領域の両方が抽出されるまでステップS641、S643の処理を繰り返す。このとき、眉領域が抽出済みであればステップS641をスキップしても良いし、目領域が抽出済みであればステップS643をスキップしても良い。ステップS645で目領域及び眉領域の何れも抽出されていない場合には、ステップS611へ戻り再処理を実行する。   If it is determined in step S615 that neither the eye area nor the eyebrow area has been extracted, the eye / eyebrow extraction unit 153 executes the eye extraction process after executing the eyebrow extraction process (S641, S643). Thereafter, the eye / brow extraction unit 153 determines whether or not the eyebrow region and the eye region are extracted in steps S641 and S643 (S645). Here, when only one of the eyebrow region and the eye region is extracted, the processes in steps S641 and S643 are repeated until both the eyebrow region and the eye region are extracted. At this time, if the eyebrow region has been extracted, step S641 may be skipped, and if the eye region has been extracted, step S643 may be skipped. If neither the eye area nor the eyebrow area is extracted in step S645, the process returns to step S611 to execute reprocessing.

ステップS615で目領域のみが抽出されていたと判定されたときは、目・眉抽出部153は、その抽出済みの目領域を破棄して、ステップS641以降を実行する。   When it is determined in step S615 that only the eye area has been extracted, the eye / eyebrow extraction unit 153 discards the extracted eye area and executes step S641 and subsequent steps.

ステップS633及びS645終了後、ステップS621で上述の通り、目と眉の相対的な位置関係の判定を行う。   After steps S633 and S645, the relative positional relationship between the eyes and the eyebrows is determined in step S621 as described above.

図7は、ステップS611等の目抽出処理の詳細な処理手順を示すフローチャートである。目・眉抽出部153は、この目処理を実行する際、既に眉領域が抽出されている場合、眉領域を除外した領域あるいは眉領域の下端よりも下の領域を対象領域として、以下の処理を行っても良い。   FIG. 7 is a flowchart showing a detailed processing procedure of the eye extraction processing in step S611 and the like. When the eye / brow extraction unit 153 executes the eye processing, if the eyebrow region has already been extracted, the following processing is performed using the region excluding the eyebrow region or the region below the lower end of the eyebrow region as a target region. May be performed.

目・眉抽出部153は、グレースケール画像に応じて、それを2値化するための閾値を決定する(S711)。例えば、目・眉抽出部153は、グレースケール画像の画素値の分布に応じて画素値の範囲を定める。さらに詳細には、例えば、目・眉抽出部153は、グレースケール画像の画像データをグレー画像データ記憶部311から読み込んで、顔面領域内の全画素または対象領域の画素についてヒストグラムを生成する。目・眉抽出部153は、このヒストグラムに基づいて、2値化のための閾値を決定しても良い。目・眉抽出部153は、図7に示す目抽出処理を実行した回数をカウントするカウンタを備えていても良い。目・眉抽出部153は、このカウンタのカウント値に応じて、ステップS711での閾値の決定方法を変えても良い。閾値によって特徴領域が正しく検出できるか否かが変わるからである。   The eye / brow extraction unit 153 determines a threshold value for binarizing the gray scale image according to the gray scale image (S711). For example, the eye / eyebrow extraction unit 153 determines the range of pixel values according to the distribution of pixel values of the grayscale image. More specifically, for example, the eye / eyebrow extraction unit 153 reads the image data of the grayscale image from the gray image data storage unit 311 and generates a histogram for all the pixels in the face area or the pixels in the target area. The eye / brow extraction unit 153 may determine a threshold for binarization based on this histogram. The eye / eyebrow extraction unit 153 may include a counter that counts the number of times the eye extraction process illustrated in FIG. 7 is executed. The eye / eyebrow extraction unit 153 may change the threshold determination method in step S711 according to the count value of the counter. This is because whether or not the feature region can be detected correctly depends on the threshold value.

目・眉抽出部153は、ステップS711で定めた閾値に基づいてグレースケール画像を2値化する(S713)。   The eye / brow extraction unit 153 binarizes the grayscale image based on the threshold value determined in step S711 (S713).

目・眉抽出部153は、ステップS713で生成した2値化画像に対して縁処理を行う(S715)。目・眉抽出部153は、ステップS715の縁処理も、上述した目抽出処理の実行回数カウンタに応じて省略しても良いし、あるいは、処理の内容を変えても良い(例えば、輪郭に沿った環状領域の幅を広くまたは狭くする、あるいは環状領域のみを消去し、そこに繋がる領域を残す。)。   The eye / brow extraction unit 153 performs edge processing on the binarized image generated in step S713 (S715). The eye / eyebrow extraction unit 153 may omit the edge processing in step S715 in accordance with the above-described eye extraction processing execution count counter, or may change the content of the processing (for example, along the contour). Widen or narrow the width of the annular region, or erase only the annular region and leave the region connected there).

目・眉抽出部153は、2値化画像から閉じた目の領域を抽出する(S717)。例えば、目・眉抽出部153は、2値化画像で面積が最も大きい特徴領域と2番目に大きい特徴領域を目領域として抽出しても良い。   The eye / brow extraction unit 153 extracts a closed eye region from the binarized image (S717). For example, the eye / brow extraction unit 153 may extract the feature area having the largest area and the second largest feature area in the binarized image as the eye area.

目・眉抽出部153は、ここで抽出した目領域が正しいか否かを判定する(S719)。目・眉抽出部153は、例えば、抽出された2つの領域の相対的な位置関係に基づいて正誤判定するようにしても良い。例えば、目・眉抽出部153は、2つの目領域の上下方向の相対的な位置ズレがないか、及び/または2つの目領域が顔面の左右の領域に分かれて存在しているか否かにより正誤判定しても良い。   The eye / eyebrow extraction unit 153 determines whether the eye region extracted here is correct (S719). For example, the eye / eyebrow extraction unit 153 may make a correct / incorrect determination based on the relative positional relationship between the two extracted regions. For example, the eye / eyebrow extraction unit 153 determines whether there is no relative positional shift between the two eye regions in the vertical direction and / or whether the two eye regions are divided into left and right regions of the face. You may make a right / wrong judgment.

目・眉抽出部153は、ステップS719の処理で、目領域が顔面領域内で同じ程度の高さであるか否かを判定しても良い。目・眉抽出部153は、例えば、いずれか一方の領域を基準領域として、その基準領域の上端または下端が、他方の領域の上端と下端の間に入っているか否かを判定しても良い。目・眉抽出部153は、何れの領域を基準領域としたときも、その上端または下端が他方の領域の上端と下端の間に入っていないときは、上下方向の位置ズレが生じているので、相対的な位置関係が正しくない判定しても良い。   The eye / eyebrow extraction unit 153 may determine whether or not the eye area has the same height in the face area in the process of step S719. The eye / eyebrow extraction unit 153 may determine, for example, whether one of the regions is a reference region and the upper end or lower end of the reference region is between the upper and lower ends of the other region. . The eye / eyebrow extraction unit 153 has a vertical misalignment when the upper or lower end of the eye / eyebrow extraction unit 153 is not between the upper and lower ends of the other region. The relative positional relationship may be determined to be incorrect.

また、原画像が被験者を正面から撮影した画像である場合、目・眉抽出部153は、ステップS719の処理で、目領域が顔面領域の左半面と右半面に分かれているか否かを判定しても良い。例えば、目・眉抽出部153は、顔領域の中心線を特定し、二つの目領域がその線の左右に分かれて存在していれば、相対的な位置関係が正しいと判定する。   Further, when the original image is an image obtained by photographing the subject from the front, the eye / brow extraction unit 153 determines whether or not the eye region is divided into the left half surface and the right half surface of the face region in the process of step S719. May be. For example, the eye / eyebrow extraction unit 153 identifies the center line of the face area, and determines that the relative positional relationship is correct if the two eye areas exist separately on the left and right sides of the line.

これ以外にも、例えば、目領域の面積、あるいは縦横比が所定の範囲であるか否かを判定しも良い。さらに、既に眉領域が抽出されているときは、目・眉抽出部153は、目領域と眉領域との相対的な位置関係も考慮して正誤判定を行っても良い。目・眉抽出部153は、ステップS719では、上記の基準の一つ以上を用いて正誤判定を行っても良い。   In addition to this, for example, it may be determined whether the area of the eye region or the aspect ratio is within a predetermined range. Further, when the eyebrow region has already been extracted, the eye / brow extraction unit 153 may perform the correctness determination in consideration of the relative positional relationship between the eye region and the eyebrow region. In step S719, the eye / eyebrow extraction unit 153 may perform right / wrong determination using one or more of the above-described criteria.

正誤判定により2つの目領域の位置関係が正しいと判断されたときは(S719:正)、目・眉抽出部153は、2つの領域を目領域として確定する(S721)。   When it is determined that the positional relationship between the two eye regions is correct (S719: correct), the eye / eyebrow extraction unit 153 determines the two regions as the eye regions (S721).

一方、正誤判定により2つの目領域の位置関係が正しくないと判断されたときは(S719:誤)、目・眉抽出部153は、抽出されている目領域を破棄して、目領域は未確定とする(S723)。   On the other hand, when it is determined that the positional relationship between the two eye regions is not correct by the correctness determination (S719: incorrect), the eye / brow extraction unit 153 discards the extracted eye region and the eye region is not yet stored. It is determined (S723).

図8は、ステップS613等の眉領域抽出処理の詳細な手順を示すフローチャートである。目・眉抽出部153は、この眉処理を実行する際、既に目領域が確定している場合には、目領域を除外した領域、あるいは目領域の上端よりも上の領域を対象領域として、以下の処理を行っても良い。   FIG. 8 is a flowchart showing a detailed procedure of eyebrow area extraction processing in step S613 and the like. When performing eyebrow processing, the eye / eyebrow extraction unit 153 sets the area excluding the eye area or the area above the upper end of the eye area as the target area if the eye area has already been determined. The following processing may be performed.

目・眉抽出部153は、眉抽出処理として、微分画像を用いて眉・微分画像処理を実行する(S811)。眉・微分画像処理の詳細については後述する。   The eye / eyebrow extraction unit 153 performs eyebrow / differential image processing using the differential image as eyebrow extraction processing (S811). Details of the eyebrow / differential image processing will be described later.

目・眉抽出部153は、ステップS811で抽出された眉領域が正しいか否かの判定をする(S812)。この正誤判定は、例えば、ステップS719の目領域に対して行う正誤判定と同様に、2つの眉領域の上下の位置ズレ、及び/または2つの眉領域が顔面の左右の領域に分かれているか否かについての判定を眉に対して行っても良い。   The eye / eyebrow extraction unit 153 determines whether the eyebrow area extracted in step S811 is correct (S812). This right / wrong determination is, for example, whether or not the two eyebrow areas are vertically displaced and / or whether the two eyebrow areas are divided into left and right areas of the face, as in the right / wrong determination performed for the eye area in step S719. This determination may be made on the eyebrows.

正誤判定により2つの眉領域の位置関係が正しくないと判断されたときは(S812:誤)、目・眉抽出部153は、抽出されている眉領域を破棄する(S814)。   When it is determined that the positional relationship between the two eyebrow areas is not correct (S812: incorrect), the eye / brow extraction unit 153 discards the extracted eyebrow area (S814).

正誤判定により2つの眉領域の位置関係が正しいと判断されたときは、これらの眉領域を眉候補領域として有効なものとしたまま(S812:正)、目・眉抽出部153が眉抽出処理として、グレースケール画像を用いて眉・グレー画像処理を実行する(S816)。眉・グレー画像処理の詳細については後述する。   When it is determined that the positional relationship between the two eyebrow areas is correct by the right / wrong determination, these eyebrow areas remain valid as eyebrow candidate areas (S812: correct), and the eye / brow extraction unit 153 performs the eyebrow extraction process. Then, eyebrow / gray image processing is executed using the grayscale image (S816). Details of the eyebrow / gray image processing will be described later.

目・眉抽出部153は、ステップS816で抽出された眉領域が正しいか否かの判定をする(S818)。この正誤判定の基準は、例えば、ステップS812と同様としても良い。   The eye / brow extraction unit 153 determines whether or not the eyebrow area extracted in step S816 is correct (S818). The criterion for correctness determination may be the same as that in step S812, for example.

正誤判定により2つの眉領域の位置関係が正しくないと判断されたときは(S818:誤)、目・眉抽出部153は、抽出されている眉領域を破棄する(S820)。   If it is determined that the positional relationship between the two eyebrow areas is not correct (S818: incorrect), the eye / brow extraction unit 153 discards the extracted eyebrow area (S820).

正誤判定により2つの眉領域の位置関係が正しいと判断されたときは、これらの眉領域を眉候補領域として有効なものとして(S818:正)、目・眉抽出部153が眉・微分画像処理と眉・グレー画像処理での処理結果に応じて眉領域を確定する(S822)。例えば、目・眉抽出部153は、眉・微分画像処理及び眉・グレー画像処理でそれぞれ眉候補領域が抽出され、かつ有効であるときは、それらのいずれか一方を眉候補として選択しても良い。例えば、目・眉抽出部153は、眉候補領域の幅、高さ、面積、アスペクト比等の一つ以上を基準としても良い。眉・微分画像処理と眉・グレー画像処理で抽出された眉領域が何れも破棄されているときは、眉領域を確定せずに終了しても良い。眉・微分画像処理と眉・グレー画像処理のいずれか一方の眉候補領域のみが有効であるときは、それを眉領域として確定しても良い。   When it is determined that the positional relationship between the two eyebrow areas is correct by the right / wrong determination, the eyebrow extraction unit 153 determines that these eyebrow areas are effective as eyebrow candidate areas (S818: correct), and the eyebrow / differential image processing is performed. The eyebrow area is determined according to the processing result of the eyebrow / gray image processing (S822). For example, the eye / eyebrow extraction unit 153 may select an eyebrow candidate region as an eyebrow candidate when the eyebrow candidate regions are extracted and valid in the eyebrow / differential image processing and the eyebrow / gray image processing, respectively. good. For example, the eye / eyebrow extraction unit 153 may use one or more of the width, height, area, aspect ratio, and the like of the eyebrow candidate region as a reference. When the eyebrow areas extracted by the eyebrow / differential image processing and the eyebrow / gray image processing are all discarded, the process may be terminated without determining the eyebrow area. When only one of the eyebrow candidate areas of the eyebrow / differential image processing and the eyebrow / gray image processing is valid, it may be determined as the eyebrow area.

なお、ここでは、眉・微分画像処理を先に行い眉・グレー画像処理を後に行っているが、これらの順序は任意である。つまり、処理の順序を逆にしても良いし、両者を同時に実行しても良い。また、眉・グレー画像処理を行わず、眉・微分画像処理で抽出された眉候補領域をそのまま眉領域としても良いし、眉・微分画像処理を行わず、眉・グレー画像処理で抽出された眉候補領域をそのまま眉領域としても良い。   Here, the eyebrow / differential image processing is performed first and the eyebrow / gray image processing is performed later, but the order of these is arbitrary. That is, the processing order may be reversed, or both may be executed simultaneously. In addition, the eyebrow candidate area extracted by the eyebrow / differential image processing may be used as it is as the eyebrow area without performing the eyebrow / gray image processing, or extracted by the eyebrow / gray image processing without performing the eyebrow / differential image processing. The eyebrow candidate area may be directly used as the eyebrow area.

図9は、ステップS811の眉・微分画像処理の詳細な手順を示すフローチャートである。   FIG. 9 is a flowchart showing a detailed procedure of the eyebrow / differential image processing in step S811.

目・眉抽出部153は、微分画像の画素値の分布に応じて、それを2値化するための閾値を決定する(S911)。さらに詳細には、目・眉抽出部153は、微分画像の画像データを微分画像データ記憶部315から読み込んで、顔面領域内の全画素または対象領域の画素についてヒストグラムを生成する。このヒストグラムに基づいて、目・眉抽出部153は、2値化のための閾値を決定する。   The eye / brow extraction unit 153 determines a threshold value for binarizing the pixel value distribution of the differential image according to the distribution of the pixel values of the differential image (S911). More specifically, the eye / eyebrow extraction unit 153 reads the image data of the differential image from the differential image data storage unit 315, and generates a histogram for all the pixels in the face area or the pixels in the target area. Based on this histogram, the eye / eyebrow extraction unit 153 determines a threshold value for binarization.

目・眉抽出部153は、図8〜図10に示す眉抽出処理を実行した回数をカウントするカウンタを備えていても良い。目・眉抽出部153は、このカウンタのカウント値に応じて、ステップS911での閾値の決定方法を変えても良い。閾値によって特徴領域が正しく検出できるか否かが変わるからである。   The eye / eyebrow extraction unit 153 may include a counter that counts the number of times the eyebrow extraction process illustrated in FIGS. The eye / eyebrow extraction unit 153 may change the threshold determination method in step S911 according to the count value of the counter. This is because whether or not the feature region can be detected correctly depends on the threshold value.

目・眉抽出部153は、ステップS911で定めた閾値に従って微分画像を2値化して微分2値化画像を生成する(S913)。   The eye / eyebrow extraction unit 153 binarizes the differential image according to the threshold determined in step S911 to generate a differential binary image (S913).

目・眉抽出部153は、微分2値化画像について、縁処理を実行する(S915)。縁処理の具体的な処理内容については上述の通りである。   The eye / eyebrow extraction unit 153 performs edge processing on the differentiated binarized image (S915). The specific processing content of the edge processing is as described above.

なお、目・眉抽出部153は、ステップS915の縁処理も、上述した眉抽出処理の実行回数カウンタに応じて省略しても良いし、あるいは、処理の内容を変えても良い(例えば、輪郭に沿った環状領域の幅を広くまたは狭くする、あるいは環状領域のみを消去し、そこに繋がる領域を残す。)。   Note that the eye / eyebrow extraction unit 153 may omit the edge processing in step S915 according to the above-described execution number counter of the eyebrow extraction processing, or may change the content of the processing (for example, contour) Widen or narrow the width of the annular region along the line or erase only the annular region, leaving a region connected there).

目・眉抽出部153は、微分2値化画像を平滑化する(S917)。例えば、目・眉抽出部153は、微分2値化画像にガウシアンフィルタを適用しても良い。   The eye / brow extraction unit 153 smoothes the differentiated binarized image (S917). For example, the eye / brow extraction unit 153 may apply a Gaussian filter to the differential binarized image.

目・眉抽出部153は、平滑化後の画像において、眉領域を抽出する(S919)。目・眉抽出部153は、例えば平滑化された画像において、最も面積が大きい特徴領域及び2番目に面積の大きい特徴領域を眉領域としても良い。   The eye / brow extraction unit 153 extracts an eyebrow region in the smoothed image (S919). For example, in the smoothed image, the eye / brow extraction unit 153 may use the feature area having the largest area and the feature area having the second largest area as the eyebrow area.

微分画像を用いることで、眉毛のエッジ抽出ができるとともに、微分画像をさらに平滑化することで、眉領域としての広がりを抽出できる。さらに、微分画像を用いることで、黒以外の色の眉も抽出できる。   By using the differential image, the edge of the eyebrows can be extracted, and further, the spread as the eyebrow region can be extracted by further smoothing the differential image. Furthermore, eyebrows of colors other than black can be extracted by using the differential image.

図10は、ステップS816の眉・グレー画像処理の詳細な手順を示すフローチャートである。   FIG. 10 is a flowchart showing a detailed procedure of eyebrow / gray image processing in step S816.

目・眉抽出部153は、原画像の明度の分布に応じて、それを2値化するための閾値を決定する(S1011)。例えば、目・眉抽出部153は、グレースケール画像の画像データをグレー画像データ記憶部311から読み込んで、顔面領域内の全画素または対象領域の画素についてヒストグラムを生成する。このヒストグラムに応じて、2値化のための閾値を決定する。   The eye / brow extraction unit 153 determines a threshold value for binarizing the original image according to the lightness distribution of the original image (S1011). For example, the eye / eyebrow extraction unit 153 reads image data of a grayscale image from the gray image data storage unit 311 and generates a histogram for all pixels in the face area or pixels in the target area. A threshold for binarization is determined according to this histogram.

目・眉抽出部153は、眉抽出処理の実行回数カウンタのカウント値に応じて、ステップS1011での閾値の決定方法を変えても良い。   The eye / eyebrow extraction unit 153 may change the threshold value determination method in step S1011 according to the count value of the execution number counter of the eyebrow extraction process.

目・眉抽出部153は、ステップS1011で定めた閾値に従ってグレースケール画像を2値化してグレー2値化画像を生成する(S1013)。   The eye / eyebrow extraction unit 153 binarizes the grayscale image according to the threshold value determined in step S1011 to generate a gray binarized image (S1013).

目・眉抽出部153は、グレー2値化画像について、縁処理を実行する(S1015)。縁処理の具体的な処理内容については上述の通りである。   The eye / eyebrow extraction unit 153 performs edge processing on the gray binarized image (S1015). The specific processing content of the edge processing is as described above.

なお、目・眉抽出部153は、ステップS1015の縁処理も、上述した眉抽出処理の実行回数カウンタに応じて省略しても良いし、あるいは、処理の内容を変えても良い(例えば、輪郭に沿った環状領域の幅を広くまたは狭くする、あるいは環状領域のみを消去し、そこに繋がる領域を残す。)。   Note that the eye / eyebrow extraction unit 153 may omit the edge processing in step S1015 in accordance with the above-described eyebrow extraction processing execution number counter, or may change the content of the processing (for example, contour) Widen or narrow the width of the annular region along the line or erase only the annular region, leaving a region connected there).

目・眉抽出部153は、グレー2値化画像において、眉領域を抽出する(S1017)。目・眉抽出部153は、例えば、最も面積が大きい特徴領域及び2番目に面積の大きい特徴領域を眉領域としても良い。   The eye / brow extraction unit 153 extracts an eyebrow region from the gray binarized image (S1017). The eye / brow extraction unit 153 may use, for example, the feature area having the largest area and the feature area having the second largest area as the eyebrow area.

図11は、ステップS260の鼻孔抽出処理の詳細な手順を示すフローチャートである。   FIG. 11 is a flowchart showing a detailed procedure of the nostril extraction process in step S260.

鼻孔抽出部155は、ステップS250までの処理で確定した眉、目及び唇の各領域を顔面領域から除外した、鼻孔抽出処理の対象領域を特定する(S1111)。   The nostril extraction unit 155 identifies the target region for the nostril extraction process by excluding the eyebrow, eye, and lip regions determined in the processing up to step S250 from the facial region (S1111).

鼻孔抽出部155は、処理対象領域の原画像の明度の分布に応じて、鼻孔抽出のための閾値を決定する(S1113)。例えば、鼻孔抽出部155は、原画像の明度の分布に応じて第4の範囲を定める。さらに詳細には、例えば、鼻孔抽出部155は、処理対象領域のグレースケール画像の画像データをグレー画像データ記憶部311から読み込んで、ヒストグラムを生成する。鼻孔抽出部155は、このヒストグラムに応じて閾値を決定するようにしても良い。この閾値よりも小さい画素値の範囲が第4の範囲である。   The nostril extraction unit 155 determines a threshold for nostril extraction in accordance with the brightness distribution of the original image of the processing target region (S1113). For example, the nostril extraction unit 155 determines the fourth range according to the brightness distribution of the original image. More specifically, for example, the nostril extraction unit 155 reads the image data of the grayscale image of the processing target region from the gray image data storage unit 311 and generates a histogram. The nostril extraction unit 155 may determine the threshold value according to this histogram. A range of pixel values smaller than this threshold is the fourth range.

鼻孔抽出部155は、処理対象領域のR比率画像に応じて、鼻孔抽出のための閾値を決定する(S1115)。例えば、鼻孔抽出部155は、R比率画像の画素値の分布に応じて第5の範囲を定める。さらに詳細には、例えば、鼻孔抽出部155は、処理対象領域のR比率画像の画像データをR比率画像データ記憶部314から読み込んで、ヒストグラムを生成する。鼻孔抽出部155は、このヒストグラムに応じて閾値を決定しても良い。この閾値よりもR比率が高い(大きい)画素値の範囲が第5の範囲である。   The nostril extraction unit 155 determines a threshold for nostril extraction according to the R ratio image of the processing target region (S1115). For example, the nostril extraction unit 155 determines the fifth range according to the distribution of the pixel values of the R ratio image. More specifically, for example, the nostril extraction unit 155 reads the image data of the R ratio image of the processing target region from the R ratio image data storage unit 314, and generates a histogram. The nostril extraction unit 155 may determine a threshold value according to this histogram. A range of pixel values having an R ratio higher (larger) than this threshold is the fifth range.

なお、鼻孔抽出部155は、図11に示す鼻孔抽出処理を実行した回数をカウントするカウンタを備えていても良い。鼻孔抽出部155は、このカウンタのカウント値に応じて、ステップS1115での閾値の決定方法を変えても良い。閾値によって特徴領域が正しく検出できるか否かが変わるからである。   Note that the nostril extraction unit 155 may include a counter that counts the number of times the nostril extraction process illustrated in FIG. 11 is executed. The nostril extraction unit 155 may change the threshold value determination method in step S1115 according to the count value of the counter. This is because whether or not the feature region can be detected correctly depends on the threshold value.

鼻孔抽出部155は、ステップS1113及びS1115で定めた閾値に基づいて鼻孔候補領域を特定する(S1117)。鼻孔抽出部155は、例えば、ステップS1113で定めた閾値よりも小さい画素値を有する画素であり、かつステップS1115で定めた閾値よりもR比率が高い(大きい)画素を特徴領域として抽出する。そして、抽出された複数の特徴領域のうち、最も面積が大きい特徴領域及び2番目に面積の大きい特徴領域を鼻孔候補領域としても良い。   The nostril extraction unit 155 identifies nostril candidate regions based on the threshold values determined in steps S1113 and S1115 (S1117). For example, the nostril extraction unit 155 extracts a pixel having a pixel value smaller than the threshold value determined in step S1113 and having an R ratio higher (larger) than the threshold value determined in step S1115 as a feature region. The feature area having the largest area and the feature area having the second largest area may be used as the nostril candidate area among the plurality of extracted feature areas.

鼻孔抽出部155は、2つの鼻孔候補領域の相対的な位置関係、及び/または周囲の既に抽出されている他の顔パーツとの相対的な位置関係に応じて、抽出された候補領域が正しいか否かを判定する(S1119)。   The nostril extraction unit 155 determines whether the extracted candidate region is correct according to the relative positional relationship between the two nostril candidate regions and / or the relative positional relationship with other facial parts that have already been extracted. Is determined (S1119).

例えば、鼻孔抽出部155は、正誤判定として、2つの鼻孔候補領域の上下方向の相対的な位置ズレの有無及び目と鼻孔と口の位置関係を判定しても良い。鼻孔抽出部155は、例えば、鼻孔として抽出された領域が顔面領域内で同じ程度の高さであるか否かを判定する。例えば、鼻孔抽出部155は、いずれか一方の領域を基準として、その基準領域の上端または下端が、他方の領域の上端と下端の間に入っているか否かを判定する。鼻孔抽出部155は、何れの領域を基準領域としたときも、その上端または下端が他方の領域の上端と下端の間に入っていないときは、上下方向の位置ズレが生じていると判定する。また、鼻孔抽出部155は、例えば、目領域から鼻孔領域までの距離と鼻孔領域から口領域までの距離が正しい関係であるかを判定しても良い。例えば、鼻孔抽出部155は、目領域の下端から鼻孔領域の上端までの距離と鼻孔領域の上端から口領域の上端までの距離を比較し、前者が長い場合に正としても良い。   For example, the nostril extraction unit 155 may determine the presence / absence of a relative positional shift in the vertical direction of the two nostril candidate regions and the positional relationship between the eyes, the nostrils, and the mouth as the correctness determination. For example, the nostril extraction unit 155 determines whether or not the region extracted as the nostril has the same height in the face region. For example, the nostril extraction unit 155 determines whether the upper end or the lower end of the reference region is between the upper end and the lower end of the other region with respect to any one region. The nostril extraction unit 155 determines that a vertical misalignment occurs when the upper end or the lower end of any region is not between the upper end and the lower end of the other region, regardless of which region is the reference region. . In addition, the nostril extraction unit 155 may determine, for example, whether the distance from the eye region to the nostril region and the distance from the nostril region to the mouth region are correct. For example, the nostril extraction unit 155 compares the distance from the lower end of the eye region to the upper end of the nostril region with the distance from the upper end of the nostril region to the upper end of the mouth region, and may be positive when the former is long.

正誤判定でこれらの鼻孔候補領域が正しいと判定されたとき(S1119:正)、鼻孔抽出部155は、この判定対象とした二つの領域を鼻孔領域として決定する(S1131)。   When it is determined that these nostril candidate regions are correct in the correctness determination (S1119: correct), the nostril extraction unit 155 determines the two regions to be determined as nostril regions (S1131).

正誤判定でこれらの鼻孔候補領域が正しくないと判定されたとき(S1119:誤)、鼻孔抽出部155は、2つの鼻孔候補領域の左右方向の相対的な重なりの有無を判定する(S1121)。鼻孔抽出部155は、例えば、鼻孔として抽出された領域が顔面領域内の左右方向で位置の重なりがあるか否かを判定する。例えば、鼻孔抽出部155は、いずれか一方の領域を基準として、その基準領域の左端または右端が、他方の領域の左端と右端の間に入っているか否かを判定する。鼻孔抽出部155は、何れかを基準領域としたとき、その左端または右端が他方の領域の左端と右端の間に入っているときは、左右方向の重なりがあると判定する。   When it is determined that these nostril candidate regions are not correct in the correct / incorrect determination (S1119: incorrect), the nostril extraction unit 155 determines whether there is a relative overlap between the two nostril candidate regions in the left-right direction (S1121). For example, the nostril extraction unit 155 determines whether or not the region extracted as the nostril has an overlapping position in the left-right direction within the face region. For example, the nostril extraction unit 155 determines whether the left end or the right end of the reference region is between the left end and the right end of the other region with respect to any one region. The nostril extraction unit 155 determines that there is an overlap in the left-right direction when the left end or the right end is between the left end and the right end of the other region when any one is set as the reference region.

左右の重なりがないとき(S1121:重なりなし)、何れの領域も鼻孔領域の候補となり得ないと判断して、ステップS1113に戻る。   When there is no left-right overlap (S1121: no overlap), it is determined that no region can be a nostril region candidate, and the process returns to step S1113.

左右の重なりがあるとき(S1121:重なりあり)、上側に位置する一方の領域が鼻孔領域の候補となり得るので、以下の処理でもう一方の候補領域を抽出する。すなわち、まず、鼻孔抽出部155は、鼻孔候補領域を再抽出する(S1123)。例えば、鼻孔抽出部155は、明度が第4の範囲内であり、かつ、R比率画像の画素値が第5の範囲内である画素が連結して形成された複数の領域のうち、面積の広さが上位の4つの領域の相互の位置関係に応じて第4領域を特定しても良い。   When there is an overlap on the left and right (S1121: with overlap), one of the upper regions can be a nostril region candidate, so the other candidate region is extracted by the following process. That is, first, the nostril extraction unit 155 re-extracts nostril candidate regions (S1123). For example, the nostril extraction unit 155 has an area of a plurality of regions formed by connecting pixels whose brightness is in the fourth range and whose pixel value of the R ratio image is in the fifth range. The fourth area may be specified in accordance with the positional relationship between the four areas having the higher dimensions.

さらに詳細には、この再抽出では、鼻孔抽出部155は、特徴領域のうち面積が三番目及び四番目に大きい領域を抽出する(面積が最大及び二番目に大きい領域は既にステップS1117で抽出済み)。そして、ここで抽出した面積が三番目及び四番目に大きい領域について、ステップS1119と同じ正誤判定を行う(S1125)。   More specifically, in this re-extraction, the nostril extraction unit 155 extracts the third and fourth largest areas of the feature area (the largest and second largest areas have already been extracted in step S1117). ). And about the area | region where the area extracted here is the 3rd and 4th largest, the same right / wrong determination as step S1119 is performed (S1125).

正誤判定でこれらの鼻孔候補領域の位置関係が正しいと判定されたとき(S1125:正)、鼻孔抽出部155は、何れの領域も鼻孔領域の候補となり得ないと判断して、ステップS1113へ戻ってそれ以降の処理をやり直す。   When it is determined that the positional relationship between these nostril candidate regions is correct in the correctness determination (S1125: correct), the nostril extraction unit 155 determines that no region can be a nostril region candidate and returns to step S1113. Then repeat the subsequent processing.

正誤判定でこれらの鼻孔候補領域の位置関係が正しくないいと判定されたとき(S1125:誤)、鼻孔抽出部155は、面積が三番目及び四番目に大きい領域について、ステップS1121と同じ左右の重なりの有無を判定する(S1127)。   When it is determined that the positional relationship between these nostril candidate regions is incorrect in the correct / incorrect determination (S1125: incorrect), the nostril extraction unit 155 performs the same left and right overlap as in step S1121 for the third and fourth largest areas. Whether or not there is is determined (S1127).

左右の重なりがないとき(S1127:重なりなし)、何れの領域も鼻孔領域の候補となり得ないと判断して、ステップS1113に戻る。   When there is no left-right overlap (S1127: no overlap), it is determined that no region can be a nostril region candidate, and the process returns to step S1113.

左右の重なりがあるとき(S1127:重なりあり)、鼻孔抽出部155は、改めて鼻孔候補領域を特定する(S1128)。すなわち、ステップS1119の判定で上側にあると判定された領域、及びステップS1125の判定で上側にあると判定された領域を鼻孔の候補領域とする。   When there is an overlap on the left and right (S1127: with an overlap), the nostril extraction unit 155 specifies a nostril candidate region again (S1128). That is, the region determined to be on the upper side in step S1119 and the region determined to be on the upper side in step S1125 are set as nostril candidate regions.

鼻孔抽出部155は、ステップS1128で特定された鼻孔候補領域を対象として、ステップS1119と同じ正誤判定を行う(S1129)。   The nostril extraction unit 155 performs the same correct / incorrect determination as in step S1119 for the nostril candidate region specified in step S1128 (S1129).

ステップS1129での正誤判定で、ここで対象とした二つの領域の位置関係が正しいと判定されたとき(S1129:正)、鼻孔抽出部155は、この判定対象とした二つの領域を鼻孔領域として決定する(S1131)。   When it is determined in step S1129 that the positional relationship between the two regions targeted here is correct (S1129: correct), the nostril extraction unit 155 uses the two regions targeted for determination as nostril regions. Determine (S1131).

ステップS1129での正誤判定で、ここで対象とした二つの領域の位置関係が正しくないと判定されたとき(S1129:誤)、鼻孔抽出部155は、ステップS1113へ戻ってそれ以降の処理をやり直す。   If it is determined in step S1129 that the positional relationship between the two regions targeted here is not correct (S1129: incorrect), the nostril extraction unit 155 returns to step S1113 and repeats the subsequent processing. .

本実施形態によれば、撮影時の条件等に依らず、人物の顔画像から顔パーツを精度良く自動的に除外することができる。   According to the present embodiment, face parts can be automatically and accurately excluded from a person's face image regardless of conditions at the time of shooting.

また、本実施形態によれば、肌画像解析を行うために、人物の顔画像から自動的に肌解析の対象領域を特定することができる。   Further, according to the present embodiment, in order to perform skin image analysis, it is possible to automatically specify a target region for skin analysis from a human face image.

上述した本発明の実施形態は、本発明の説明のための例示であり、本発明の範囲をそれらの実施形態にのみ限定する趣旨ではない。当業者は、本発明の要旨を逸脱することなしに、他の様々な態様で本発明を実施することができる。   The above-described embodiments of the present invention are examples for explaining the present invention, and are not intended to limit the scope of the present invention only to those embodiments. Those skilled in the art can implement the present invention in various other modes without departing from the gist of the present invention.

1 画像処理装置
5 カメラ
10 画像処理装置本体
11 前処理部
13 顔面抽出部
15 顔パーツ抽出部
17 マスク生成処理部
19 肌解析処理部
111 グレー画像生成部
113 色相画像生成部
115 比率画像生成部
117 比率画像生成部
119 微分画像生成部
151 唇抽出部
153 目・眉抽出部
155 鼻孔抽出部
300 原画像データ記憶部
311 グレー画像データ記憶部
312 色相画像データ記憶部
313 比率画像データ記憶部
314 比率画像データ記憶部
315 微分画像データ記憶部
350 顔面領域データ記憶部
360 唇領域データ記憶部
370 目・眉領域データ記憶部
380 鼻孔領域データ記憶部
390 マスク領域データ記憶部
DESCRIPTION OF SYMBOLS 1 Image processing apparatus 5 Camera 10 Image processing apparatus main body 11 Pre-processing part 13 Face extraction part 15 Face part extraction part 17 Mask generation processing part 19 Skin analysis processing part 111 Gray image generation part 113 Hue image generation part 115 Ratio image generation part 117 Ratio image generation unit 119 Differential image generation unit 151 Lip extraction unit 153 Eye / brow extraction unit 155 Nostril extraction unit 300 Original image data storage unit 311 Gray image data storage unit 312 Hue image data storage unit 313 Ratio image data storage unit 314 Ratio image Data storage unit 315 Differential image data storage unit 350 Facial region data storage unit 360 Lip region data storage unit 370 Eye / brow region data storage unit 380 Nostril region data storage unit 390 Mask region data storage unit

Claims (14)

被験者の顔を撮影したRGB成分を有する原画像の画像データを記憶する記憶部と、
前記原画像で明度及び色相が所定範囲内の画素を抽出して、前記被験者の顔面領域を特定する手段と、
前記原画像で正規化されたG(緑)成分または色相が所定範囲内の画素を抽出して、前記顔面領域内の唇を含む第1領域を特定する手段と、
前記原画像を微分した微分画像の画像データまたは前記原画像をグレースケール化したグレースケール画像の画像データに応じて、前記顔面領域内の眉を含む第2領域を特定する手段と、
前記原画像で明度が所定範囲内の画素を抽出して、前記顔面領域内の閉じた目を含む第3領域を特定する手段と、
前記原画像で、前記顔面領域から前記第1領域〜第3領域のうちの少なくとも一つの領域を除去した領域内の正規化されたR(赤)成分が所定範囲内の画素を抽出して、前記顔面領域内の鼻孔を含む第4領域を特定する手段と、
前記顔面領域から前記第1領域〜第4領域のうちの少なくとも一つの領域を除去した肌領域を抽出する手段と、
前記肌領域の原画像データに応じて、前記被験者の肌の状態を解析する解析手段と、を備える肌画像解析装置。
A storage unit for storing image data of an original image having RGB components obtained by photographing the face of the subject;
Means for extracting pixels whose brightness and hue are within a predetermined range in the original image, and specifying the facial region of the subject;
Means for extracting a pixel having a G (green) component or hue normalized in the original image within a predetermined range, and identifying a first region including the lips in the facial region;
Means for specifying a second region including an eyebrow in the facial region in accordance with image data of a differential image obtained by differentiating the original image or image data of a grayscale image obtained by grayscale converting the original image;
Means for extracting a pixel having a lightness within a predetermined range in the original image and identifying a third region including a closed eye in the face region;
In the original image, a pixel in which a normalized R (red) component in a region obtained by removing at least one of the first region to the third region from the facial region is extracted within a predetermined range; Means for identifying a fourth region including a nostril in the facial region;
Means for extracting a skin region obtained by removing at least one of the first region to the fourth region from the facial region;
A skin image analysis apparatus comprising: analysis means for analyzing the skin condition of the subject according to the original image data of the skin region.
前記顔面領域を特定する手段は、
前記グレースケール画像の画素値の分布に応じて第1の範囲を定め、
前記原画像の画素値を色相に変換した画像である色相画像の画素値の分布に応じて第2の範囲を定め、
前記グレースケール画像の画素値が第1の範囲内であり、かつ、前記色相画像の画素値が第2の範囲内である画素を抽出する、請求項1記載の肌画像解析装置。
The means for specifying the facial area is:
A first range is determined according to a distribution of pixel values of the grayscale image,
A second range is determined according to a distribution of pixel values of a hue image that is an image obtained by converting pixel values of the original image into a hue,
The skin image analysis apparatus according to claim 1, wherein pixels whose pixel values of the gray scale image are within a first range and whose pixel values of the hue image are within a second range are extracted.
前記顔面領域内の唇を含む第1領域を特定する手段は、
前記原画像の画素値をG/(R+G+B)に変換した画像であるG比率画像の画素値の分布に応じて第3の範囲を定め、
前記G比率画像成分の画素値が第3の範囲内である画素を含む領域を第1唇候補領域とし、
前記G比率画像成分の画素値が第3の範囲内である画素を特定してシワ消し処理を適用し、残った画素を含む領域を第2唇候補領域とし、
第1唇候補領域及び第2唇候補領域のいずれか一方を第1領域とする、請求項1または2に記載の肌画像解析装置。
The means for specifying the first area including the lips in the face area is:
A third range is determined according to a distribution of pixel values of a G ratio image that is an image obtained by converting the pixel value of the original image into G / (R + G + B),
A region including pixels whose pixel values of the G ratio image component are within the third range is defined as a first lip candidate region,
A pixel whose pixel value of the G ratio image component is in the third range is specified and a wrinkle elimination process is applied, and a region including the remaining pixels is set as a second lip candidate region,
The skin image analysis apparatus according to claim 1 or 2, wherein one of the first lip candidate area and the second lip candidate area is the first area.
前記顔面領域内の眉を含む第2領域を特定する手段は、
前記微分画像の画素値の分布に応じて定めた閾値に従って前記微分画像を2値化した画像である微分2値化画像を生成し、
前記微分2値化画像を平滑化した画像である平滑化画像を生成し、
前記平滑化画像に応じて第2領域を定める、請求項1〜3のいずれかに記載の肌画像解析装置。
The means for specifying the second region including the eyebrows in the facial region is
Generating a differential binarized image that is an image obtained by binarizing the differential image according to a threshold value determined according to a distribution of pixel values of the differential image;
Generating a smoothed image that is an image obtained by smoothing the differentiated binary image;
The skin image analysis apparatus according to claim 1, wherein a second region is determined according to the smoothed image.
前記顔面領域内の眉を含む第2領域を特定する手段は、
前記微分画像の画素値の分布に応じて定めた閾値に従って前記微分画像を2値化した画像である微分2値化画像を生成し、
前記微分2値化画像を平滑化した画像である平滑化画像を生成し、
前記平滑化画像に応じて第3眉候補領域を定め、
前記グレースケール画像の画素値の分布に応じて定めた閾値に従って前記グレースケール画像を2値化した画像であるグレースケール2値化画像を生成し、
前記グレースケール2値化画像に応じて第4眉候補領域を定め、
第3眉候補領域及び第4眉候補領域のいずれか一方を第2領域とする、請求項1〜3のいずれかに記載の肌画像解析装置。
The means for specifying the second region including the eyebrows in the facial region is
Generating a differential binarized image that is an image obtained by binarizing the differential image according to a threshold value determined according to a distribution of pixel values of the differential image;
Generating a smoothed image that is an image obtained by smoothing the differentiated binary image;
A third eyebrow candidate area is determined according to the smoothed image,
Generating a grayscale binarized image that is an image obtained by binarizing the grayscale image according to a threshold value determined according to a distribution of pixel values of the grayscale image;
A fourth eyebrow candidate area is determined according to the grayscale binarized image,
The skin image analysis apparatus according to any one of claims 1 to 3, wherein one of the third eyebrow candidate area and the fourth eyebrow candidate area is the second area.
前記顔面領域内の鼻孔を含む第4領域を特定する手段は、
前記原画像の明度に応じて第4の範囲を定め、
前記原画像の画素値をR/(R+G+B)に変換した画像であるR比率画像の画素値の分布に応じて第5の範囲を定め、
明度が第4の範囲内であり、かつ、前記R比率画像の画素値が第5の範囲内である画素を含む領域を第4領域とする、請求項1〜5のいずれかに記載の肌画像解析装置。
The means for identifying the fourth region including the nostril in the facial region is:
A fourth range is determined according to the brightness of the original image,
A fifth range is determined according to a distribution of pixel values of an R ratio image, which is an image obtained by converting the pixel value of the original image into R / (R + G + B),
The skin according to any one of claims 1 to 5, wherein a region including a pixel having a lightness within a fourth range and a pixel value of the R ratio image within a fifth range is defined as a fourth region. Image analysis device.
前記顔面領域内の鼻孔を含む第4領域を特定する手段は、
明度が第4の範囲内であり、かつ、前記R比率画像の画素値が第5の範囲内である画素が連結して形成された複数の領域のうち、面積の広さが上位の4つの領域の相互の位置関係に応じて第4領域を特定する、請求項6に記載の肌画像解析装置。
The means for identifying the fourth region including the nostril in the facial region is:
Of the plurality of regions formed by connecting pixels whose lightness is within the fourth range and whose pixel value of the R ratio image is within the fifth range, the top four areas are wide. The skin image analysis apparatus according to claim 6, wherein the fourth area is specified according to the mutual positional relationship of the areas.
被験者の顔を撮影したRGB成分を有する原画像の画像データを記憶する記憶部を備えた肌画像解析装置に実行させるためのコンピュータプログラムであって、
前記原画像で明度及び色相が所定範囲内の画素を抽出して、前記被験者の顔面領域を特定する手段と、
前記原画像で正規化されたG(緑)成分または色相が所定範囲内の画素を抽出して、前記顔面領域内の唇を含む第1領域を特定する手段と、
前記原画像を微分した微分画像の画像データまたは前記原画像をグレースケール化したグレースケール画像の画像データに応じて、前記顔面領域内の眉を含む第2領域を特定する手段と、
前記原画像で明度が所定範囲内の画素を抽出して、前記顔面領域内の閉じた目を含む第3領域を特定する手段と、
前記原画像で、前記顔面領域から前記第1領域〜第3領域のうちの少なくとも一つの領域を除去した領域内の正規化されたR(赤)成分が所定範囲内の画素を抽出して、前記顔面領域内の鼻孔を含む第4領域を特定する手段と、
前記顔面領域から前記第1領域〜第4領域のうちの少なくとも一つの領域を除去した肌領域を抽出する手段と、
前記肌領域の原画像データに応じて、前記被験者の肌の状態を解析する解析手段と、を前記肌画像解析装置上に構築するためのコンピュータプログラム。
A computer program for causing a skin image analysis apparatus provided with a storage unit to store image data of an original image having RGB components obtained by photographing a face of a subject,
Means for extracting pixels whose brightness and hue are within a predetermined range in the original image, and specifying the facial region of the subject;
Means for extracting a pixel having a G (green) component or hue normalized in the original image within a predetermined range, and identifying a first region including the lips in the facial region;
Means for specifying a second region including an eyebrow in the facial region in accordance with image data of a differential image obtained by differentiating the original image or image data of a grayscale image obtained by grayscale converting the original image;
Means for extracting a pixel having a lightness within a predetermined range in the original image and identifying a third region including a closed eye in the face region;
In the original image, a pixel in which a normalized R (red) component in a region obtained by removing at least one of the first region to the third region from the facial region is extracted within a predetermined range; Means for identifying a fourth region including a nostril in the facial region;
Means for extracting a skin region obtained by removing at least one of the first region to the fourth region from the facial region;
A computer program for constructing, on the skin image analysis device, analysis means for analyzing the skin condition of the subject according to the original image data of the skin region.
被験者の顔を撮影したRGB成分を有する原画像の画像データを記憶する記憶部を備えた肌画像解析装置が行う肌画像解析方法であって、
顔面領域抽出部が、前記原画像で明度及び色相が所定範囲内の画素を抽出して、前記被験者の顔面領域を特定するステップと、
唇抽出部が、前記原画像で正規化されたG(緑)成分または色相が所定範囲内の画素を抽出して、前記顔面領域内の唇を含む第1領域を特定するステップと、
目・眉抽出部が、前記原画像を微分した微分画像の画像データまたは前記原画像をグレースケール化したグレースケール画像の画像データに応じて、前記顔面領域内の眉を含む第2領域を特定し、前記原画像で明度が所定範囲内の画素を抽出して、前記顔面領域内の閉じた目を含む第3領域を特定するステップと、
鼻孔抽出部が、前記原画像で、前記顔面領域から前記第1領域〜第3領域のうちの少なくとも一つの領域を除去した領域内の正規化されたR(赤)成分が所定範囲内の画素を抽出して、前記顔面領域内の鼻孔を含む第4領域を特定するステップと、
肌解析処理部が、前記顔面領域から前記第1領域〜第4領域のうちの少なくとも一つの領域を除去した肌領域の原画像データに応じて、前記被験者の肌の状態を解析するステップと、を行う方法。
A skin image analysis method performed by a skin image analysis apparatus including a storage unit that stores image data of an original image having RGB components obtained by photographing a face of a subject,
A face area extracting unit extracting pixels within a predetermined range of brightness and hue in the original image, and specifying the face area of the subject;
A lip extraction unit extracting a pixel having a G (green) component or hue normalized by the original image within a predetermined range, and identifying a first region including the lips in the facial region;
The eye / brow extraction unit identifies a second area including the eyebrows in the face area according to image data of a differential image obtained by differentiating the original image or image data of a grayscale image obtained by converting the original image to gray scale Extracting a pixel having a lightness within a predetermined range from the original image and identifying a third region including a closed eye in the face region;
Pixels whose normalized R (red) component is within a predetermined range in a region obtained by removing at least one of the first region to the third region from the face region in the original image by the nostril extraction unit. And identifying a fourth region including a nostril in the facial region;
A step of analyzing a skin condition of the subject according to original image data of a skin area obtained by removing at least one of the first area to the fourth area from the face area; How to do.
被験者の顔を撮影したRGB成分を有する原画像の画像データを記憶する記憶部と、
前記原画像で明度及び色相が所定範囲内の画素を抽出して、前記被験者の顔面領域を特定する手段と、
前記原画像で正規化されたG(緑)成分または色相が所定範囲内の画素を抽出して、前記顔面領域内の唇を含む第1領域を特定する手段と、
前記原画像を微分した微分画像の画像データまたは前記原画像をグレースケール化したグレースケール画像の画像データに応じて、前記顔面領域内の眉を含む第2領域を特定する手段と、
前記原画像で明度が所定範囲内の画素を抽出して、前記顔面領域内の閉じた目を含む第3領域を特定する手段と、
前記原画像で、前記顔面領域から前記第1領域〜第3領域のうちの少なくとも一つの領域を除去した領域内の正規化されたR(赤)成分が所定範囲内の画素を抽出して、前記顔面領域内の鼻孔を含む第4領域を特定する手段と、
前記顔面領域から前記第1領域〜第4領域のうちの少なくとも一つの領域を除去する手段と、を備える画像処理装置。
A storage unit for storing image data of an original image having RGB components obtained by photographing the face of the subject;
Means for extracting pixels whose brightness and hue are within a predetermined range in the original image, and specifying the facial region of the subject;
Means for extracting a pixel having a G (green) component or hue normalized in the original image within a predetermined range, and identifying a first region including the lips in the facial region;
Means for specifying a second region including an eyebrow in the facial region in accordance with image data of a differential image obtained by differentiating the original image or image data of a grayscale image obtained by grayscale converting the original image;
Means for extracting a pixel having a lightness within a predetermined range in the original image and identifying a third region including a closed eye in the face region;
In the original image, a pixel in which a normalized R (red) component in a region obtained by removing at least one of the first region to the third region from the facial region is extracted within a predetermined range; Means for identifying a fourth region including a nostril in the facial region;
Image processing and means divided at least one region of said first region to the fourth region from the face region.
被験者の顔を撮影したRGB成分を有する原画像の画像データを記憶する記憶部を備えた画像処理装置に実行させるためのコンピュータプログラムであって、
前記原画像で明度及び色相が所定範囲内の画素を抽出して、前記被験者の顔面領域を特定する手段と、
前記原画像で正規化されたG(緑)成分または色相が所定範囲内の画素を抽出して、前記顔面領域内の唇を含む第1領域を特定する手段と、
前記原画像を微分した微分画像の画像データまたは前記原画像をグレースケール化したグレースケール画像の画像データに応じて、前記顔面領域内の眉を含む第2領域を特定する手段と、
前記原画像で明度が所定範囲内の画素を抽出して、前記顔面領域内の閉じた目を含む第3領域を特定する手段と、
前記原画像で、前記顔面領域から前記第1領域〜第3領域のうちの少なくとも一つの領域を除去した領域内の正規化されたR(赤)成分が所定範囲内の画素を抽出して、前記顔面領域内の鼻孔を含む第4領域を特定する手段と、
前記顔面領域から前記第1領域〜第4領域のうちの少なくとも一つの領域を除去した領域を抽出する手段と、を前記画像解析装置上に構築するためのコンピュータプログラム。
A computer program for causing an image processing apparatus provided with a storage unit to store image data of an original image having RGB components obtained by photographing a subject's face,
Means for extracting pixels whose brightness and hue are within a predetermined range in the original image, and specifying the facial region of the subject;
Means for extracting a pixel having a G (green) component or hue normalized in the original image within a predetermined range, and identifying a first region including the lips in the facial region;
Means for specifying a second region including an eyebrow in the facial region in accordance with image data of a differential image obtained by differentiating the original image or image data of a grayscale image obtained by grayscale converting the original image;
Means for extracting a pixel having a lightness within a predetermined range in the original image and identifying a third region including a closed eye in the face region;
In the original image, a pixel in which a normalized R (red) component in a region obtained by removing at least one of the first region to the third region from the facial region is extracted within a predetermined range; Means for identifying a fourth region including a nostril in the facial region;
Computer program for constructing means for extracting realm removing at least one region of said first region to the fourth region from the face region, the prior-outs image analyzer on.
被験者の顔を撮影したRGB成分を有する原画像の画像データを記憶する記憶部を備えた画像処理装置が行う画像処理方法であって、
顔面領域抽出部が、前記原画像で明度及び色相が所定範囲内の画素を抽出して、前記被験者の顔面領域を特定するステップと、
唇抽出部が、前記原画像で正規化されたG(緑)成分または色相が所定範囲内の画素を抽出して、前記顔面領域内の唇を含む第1領域を特定するステップと、
目・眉抽出部が、前記原画像を微分した微分画像の画像データまたは前記原画像をグレースケール化したグレースケール画像の画像データに応じて、前記顔面領域内の眉を含む第2領域を特定し、前記原画像で明度が所定範囲内の画素を抽出して、前記顔面領域内の閉じた目を含む第3領域を特定するステップと、
鼻孔抽出部が、前記原画像で、前記顔面領域から前記第1領域〜第3領域のうちの少なくとも一つの領域を除去した領域内の正規化されたR(赤)成分が所定範囲内の画素を抽出して、前記顔面領域内の鼻孔を含む第4領域を特定するステップと、
マスク生成処理部が、前記顔面領域から前記第1領域〜第4領域のうちの少なくとも一つの領域を除去してマスクを生成するステップと、を行う方法。
An image processing method performed by an image processing apparatus including a storage unit that stores image data of an original image having RGB components obtained by photographing a face of a subject,
A face area extracting unit extracting pixels within a predetermined range of brightness and hue in the original image, and specifying the face area of the subject;
A lip extraction unit extracting a pixel having a G (green) component or hue normalized by the original image within a predetermined range, and identifying a first region including the lips in the facial region;
The eye / brow extraction unit identifies a second area including the eyebrows in the face area according to image data of a differential image obtained by differentiating the original image or image data of a grayscale image obtained by converting the original image to gray scale Extracting a pixel having a lightness within a predetermined range from the original image and identifying a third region including a closed eye in the face region;
Pixels whose normalized R (red) component is within a predetermined range in a region obtained by removing at least one of the first region to the third region from the face region in the original image by the nostril extraction unit. And identifying a fourth region including a nostril in the facial region;
How mask generation processing unit performs the steps of: generating a mask by removing at least one region of said first region to the fourth region from the face region.
被験者の顔を撮影したRGB成分を有する原画像の画像データを記憶する記憶部と、
前記原画像で明度及び色相が所定範囲内の画素を抽出して、前記被験者の顔面領域を特定する手段と、
前記原画像で正規化されたG(緑)成分が所定範囲内の画素を抽出して、前記顔面領域内の唇を含む第1領域を特定する手段と、
前記顔面領域から少なくとも前記第1領域を除去する手段と、を備える画処理装置。
A storage unit for storing image data of an original image having RGB components obtained by photographing the face of the subject;
Means for extracting pixels whose brightness and hue are within a predetermined range in the original image, and specifying the facial region of the subject;
It means for normalized G (green) Ingredient in the original image by extracting pixels in a predetermined range, identifying a first region including a lip of the facial area,
Means it divided at least the first region from said facial region, images processing device Ru comprising a.
被験者の顔を撮影したRGB成分を有する原画像の画像データを記憶する記憶部と、
前記原画像で明度及び色相が所定範囲内の画素を抽出して、前記被験者の顔面領域を特定する手段と、
前記原画像で、前記顔面領域から正規化されたR(赤)成分が所定範囲内の画素を抽出して、前記顔面領域内の鼻孔を含む第4領域を特定する手段と、
前記顔面領域から少なくとも前記第4領域を除去する手段と、を備える画処理装置。
A storage unit for storing image data of an original image having RGB components obtained by photographing the face of the subject;
Means for extracting pixels whose brightness and hue are within a predetermined range in the original image, and specifying the facial region of the subject;
In the original image, and means for the facial area or RaTadashi-normalized been R (red) component and extracting pixels in a predetermined range and identifies a fourth region including a nostril of the facial area,
Means you divided at least the fourth region from the face region, images processing device Ru comprising a.
JP2015053200A 2015-03-17 2015-03-17 Skin image analysis apparatus, image processing apparatus, and computer program Expired - Fee Related JP6058722B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2015053200A JP6058722B2 (en) 2015-03-17 2015-03-17 Skin image analysis apparatus, image processing apparatus, and computer program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2015053200A JP6058722B2 (en) 2015-03-17 2015-03-17 Skin image analysis apparatus, image processing apparatus, and computer program

Publications (2)

Publication Number Publication Date
JP2016173716A JP2016173716A (en) 2016-09-29
JP6058722B2 true JP6058722B2 (en) 2017-01-11

Family

ID=57008948

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015053200A Expired - Fee Related JP6058722B2 (en) 2015-03-17 2015-03-17 Skin image analysis apparatus, image processing apparatus, and computer program

Country Status (1)

Country Link
JP (1) JP6058722B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110709856B (en) * 2017-05-31 2023-11-28 宝洁公司 System and method for determining apparent skin age
WO2024029600A1 (en) * 2022-08-04 2024-02-08 花王株式会社 Skin condition estimating method

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3319408B2 (en) * 1998-10-12 2002-09-03 株式会社豊田中央研究所 Facial feature extraction device
JP2006048485A (en) * 2004-08-06 2006-02-16 Advanced Telecommunication Research Institute International Input support device
JP2008293325A (en) * 2007-05-25 2008-12-04 Noritsu Koki Co Ltd Face image analysis system
WO2012099013A1 (en) * 2011-01-20 2012-07-26 シャープ株式会社 Image correction device, image correction display device, image correction method, program, and recording medium

Also Published As

Publication number Publication date
JP2016173716A (en) 2016-09-29

Similar Documents

Publication Publication Date Title
JP4307496B2 (en) Facial part detection device and program
JP5547730B2 (en) Automatic facial and skin beautification using face detection
US9036917B2 (en) Image recognition based on patterns of local regions
KR101853006B1 (en) Recognition of Face through Detecting Nose in Depth Image
JP4723834B2 (en) Photorealistic three-dimensional face modeling method and apparatus based on video
CN108463823B (en) Reconstruction method and device of user hair model and terminal
US9135726B2 (en) Image generation apparatus, image generation method, and recording medium
EP3067865B1 (en) Image processing apparatus and image processing method
KR20050022306A (en) Method and Apparatus for image-based photorealistic 3D face modeling
JP2005327009A (en) Image correction device
JP2007272435A (en) Face feature extraction device and face feature extraction method
CN107038704B (en) Retina image exudation area segmentation method and device and computing equipment
JP2005293539A (en) Facial expression recognizing device
CN111967319A (en) Infrared and visible light based in-vivo detection method, device, equipment and storage medium
JP6058722B2 (en) Skin image analysis apparatus, image processing apparatus, and computer program
KR20100121817A (en) Method for tracking region of eye
KR100950138B1 (en) A method for detecting the pupils in a face image
JP2003256834A (en) Face area extracting and face configuring element position judging device
KR20020085669A (en) The Apparatus and Method for Abstracting Peculiarity of Two-Dimensional Image & The Apparatus and Method for Creating Three-Dimensional Image Using Them
JP6467817B2 (en) Image processing apparatus, image processing method, and program
JP2022147713A (en) Image generation device, learning device, and image generation method
JP4803148B2 (en) Binocular position detection method and detection apparatus for human face image
JP4664805B2 (en) Face edge detection device, face edge detection method, and program
JP5603258B2 (en) Detection apparatus and detection method
Chang et al. Automatic detection and correction for glossy reflections in digital photograph

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20160721

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20160726

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20160905

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20161206

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20161207

R150 Certificate of patent or registration of utility model

Ref document number: 6058722

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees