WO2012056743A1 - 画像処理装置、画像処理方法、および制御プログラム - Google Patents

画像処理装置、画像処理方法、および制御プログラム Download PDF

Info

Publication number
WO2012056743A1
WO2012056743A1 PCT/JP2011/056449 JP2011056449W WO2012056743A1 WO 2012056743 A1 WO2012056743 A1 WO 2012056743A1 JP 2011056449 W JP2011056449 W JP 2011056449W WO 2012056743 A1 WO2012056743 A1 WO 2012056743A1
Authority
WO
WIPO (PCT)
Prior art keywords
color
skin
image
makeup
person image
Prior art date
Application number
PCT/JP2011/056449
Other languages
English (en)
French (fr)
Inventor
青木 博松
Original Assignee
オムロン株式会社
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 オムロン株式会社 filed Critical オムロン株式会社
Priority to KR1020137009836A priority Critical patent/KR101614193B1/ko
Priority to US13/878,109 priority patent/US20130271485A1/en
Priority to EP11835887.8A priority patent/EP2615576B1/en
Priority to CN201180050443.6A priority patent/CN103180872B/zh
Publication of WO2012056743A1 publication Critical patent/WO2012056743A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • AHUMAN NECESSITIES
    • A45HAND OR TRAVELLING ARTICLES
    • A45DHAIRDRESSING OR SHAVING EQUIPMENT; EQUIPMENT FOR COSMETICS OR COSMETIC TREATMENTS, e.g. FOR MANICURING OR PEDICURING
    • A45D44/00Other cosmetic or toiletry articles, e.g. for hairdressers' rooms
    • A45D44/005Other cosmetic or toiletry articles, e.g. for hairdressers' rooms for selecting or displaying personal cosmetic colours or hairstyle
    • AHUMAN NECESSITIES
    • A45HAND OR TRAVELLING ARTICLES
    • A45DHAIRDRESSING OR SHAVING EQUIPMENT; EQUIPMENT FOR COSMETICS OR COSMETIC TREATMENTS, e.g. FOR MANICURING OR PEDICURING
    • A45D44/00Other cosmetic or toiletry articles, e.g. for hairdressers' rooms
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/001Texturing; Colouring; Generation of texture or colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T19/00Manipulating 3D models or images for computer graphics
    • G06T19/20Editing of 3D images, e.g. changing shapes or colours, aligning objects or positioning parts
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformation in the plane of the image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/56Extraction of image or video features relating to colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/161Detection; Localisation; Normalisation
    • G06V40/162Detection; Localisation; Normalisation using pixel segmentation or colour matching
    • AHUMAN NECESSITIES
    • A45HAND OR TRAVELLING ARTICLES
    • A45DHAIRDRESSING OR SHAVING EQUIPMENT; EQUIPMENT FOR COSMETICS OR COSMETIC TREATMENTS, e.g. FOR MANICURING OR PEDICURING
    • A45D44/00Other cosmetic or toiletry articles, e.g. for hairdressers' rooms
    • A45D2044/007Devices for determining the condition of hair or skin or for selecting the appropriate cosmetic or hair treatment

Definitions

  • the present invention relates to an image processing apparatus and an image processing method, and more particularly to an image processing apparatus and an image processing method for correcting a face image.
  • Patent Document 1 discloses a blusher makeup simulation technique in which blusher is applied to a captured user's face image.
  • Patent Document 2 discloses an eye makeup simulation technique for drawing an eye shadow and an eye line on a captured user's face image. According to these techniques, since a color such as blusher or eye shadow is applied to the color of the user's face image, makeup according to the color of the user's skin can be applied.
  • Japanese Patent Publication Japanese Laid-Open Patent Publication No. 2000-279228 (Released on October 10, 2000)” Japanese Patent Publication “JP 2000-285222 A (publication date: October 13, 2000)”
  • Patent Document 1 and Patent Document 2 are based on the premise that an optimal face image is prepared for performing a makeup simulation.
  • the above conventional technique is based on the use of an expressionless front face image in which the periphery of the eyes and cheeks is not hidden by other objects, and the entire face is exposed to uniform light. It is said. Therefore, for example, in a cosmetics store, first, a customer (user) is asked to sit at the camera, and preparations such as raising bangs and removing glasses are made. Thereafter, the salesperson captures the customer's optimal face image under illumination arranged to be illuminated uniformly and inputs the expressionless front face image to the makeup simulator. If the makeup simulation fails, the above process is repeated.
  • Patent Document 1 and Patent Document 2 cannot perform a makeup simulation in a normal state, that is, in a state where the bangs are lowered or glasses are worn.
  • Patent Document 1 and Patent Document 2 can be applied to a digital camera or a camera-equipped mobile phone, and software that applies makeup to a captured face image can be realized. Further, it may be applied as a makeup simulator that operates on a personal computer or a server on the Internet. In this case, it is not necessary to ask the salesperson for a makeup simulation.
  • the snapshot often includes face images that are difficult to perform a makeup simulation in the first place, such as a face whose direction is not frontal or a face that is intentionally distorted. If a makeup simulation according to a conventional technique is performed on such a face image, the correction cannot be performed as intended, and an unnatural result is generated.
  • the present invention has been made in view of the above problems, and an object of the present invention is to realize an image processing apparatus and an image processing method capable of appropriately performing a makeup process on a wide range of face images. is there.
  • An image processing apparatus is an image processing apparatus that performs a process of coloring a pattern of a certain color on the skin of a person image, and in order to solve the above problems, at least a part of the area of the person image For each part, a skin specifying part for specifying the skin color degree of the color in the person image, and a coloring part for coloring the pattern in the person image according to the density corresponding to the skin color degree are provided. .
  • An image processing method is an image processing method that performs a process of coloring a pattern of a certain color on the skin of a person image, and in order to solve the above-described problem, at least a partial region of the person image
  • the skin color degree of each part of at least a partial region of the person image is specified, and the pattern is colored on the person image with a density corresponding to the skin color degree. Therefore, the pattern that is considered to be skin can be colored deeply, and the part that is not considered to be skin (for example, hair, glasses, etc.) can be lightly colored or not colored. Therefore, a pattern such as makeup can be appropriately colored on the skin of the person image. Therefore, for example, a makeup simulation can be performed using images taken under a wide range of conditions without preparing images with raised bangs, glasses, or illumination.
  • the skin color level of each part of the human image is specified, and the pattern is colored on the human image with a density corresponding to the skin color level.
  • a pattern such as makeup can be appropriately colored on the skin of the person image. Therefore, a makeup simulation can be performed using images taken under a wide range of conditions.
  • FIG. 1 is a block diagram showing a schematic configuration of a digital camera 1 according to the present embodiment.
  • the digital camera 1 includes an instruction input device 2, an imaging device 3, an image storage device 4, a display device 5, and an image processing device 6.
  • the instruction input device 2 includes an input device such as a button, a key, or a touch panel, receives an imaging instruction from a user, and outputs an imaging instruction to the imaging device 3.
  • the instruction input device 2 receives a makeup processing instruction from the user, and outputs a makeup processing instruction to the image processing device 6.
  • the imaging device 3 includes an imaging element such as a CCD (charge coupled device) or a CMOS (complementary metal oxide semiconductor) imaging element.
  • the imaging device 3 captures an image according to an imaging instruction, and outputs the captured image (image data) to the image storage device 4.
  • the image storage device 4 stores various types of information, and includes a storage device such as an HDD (Hard Disk Drive) or a flash memory.
  • the image storage device 4 stores and stores the image received from the imaging device 3.
  • the display device 5 includes a display, displays the input image, and presents it to the user.
  • the display device 5 receives the makeup-processed image from the image processing device 6 and displays the makeup-processed image.
  • the image processing device 6 includes an image acquisition unit 11, a face detection unit 12, a feature detection unit (detection unit) 13, a suitability determination unit 14, a makeup shape determination unit 15, a color correction unit 16, a synthesis unit (coloring unit) 17, and A display control unit 18 is provided.
  • the image acquisition unit 11 receives a makeup processing instruction from the instruction input device 2.
  • the makeup processing instruction includes information indicating an image to be processed and information indicating what makeup (eye shadow or blusher, its shape, color, etc.) is to be performed.
  • the image acquisition unit 11 acquires an image to be processed from the image storage device 4 based on the received makeup processing instruction. Note that the image acquisition unit 11 may directly receive an image captured from the imaging device 3.
  • the image acquisition unit 11 outputs the acquired processing target image to the face detection unit 12. Further, the image acquisition unit 11 outputs a makeup processing instruction to the makeup shape determination unit 15.
  • the face detection unit 12 detects a face image included in the image received from the image acquisition unit 11. When detecting the face image included in the image, the face detection unit 12 specifies the position of the face image. The position of the face image may indicate the coordinates of a predetermined point of the face image, or may indicate a region of the face image. The face detection unit 12 outputs the processing target image and the position of the face image to the feature detection unit 13. The face detection unit 12 may detect a plurality of face images from the processing target image. When a plurality of face images are detected, the face detection unit 12 may specify the position of each face image and output the positions of the plurality of face images to the feature detection unit 13.
  • the feature detection unit 13 detects the position of each feature of the face of the face image from the image to be processed and the position of the face image received from the face detection unit 12.
  • the feature detection unit 13 includes, for example, the eyes (the eyes, the corners of the eyes, the upper eyelid contour points, the lower eyelid contour points, etc.), the mouth (the mouth end point, the mouth center point, etc.), and the nose (the apex of the nose). And the like, and features (feature points) such as facial contours are identified and their positions are specified.
  • the position of the feature may indicate the coordinates of the feature point, or may indicate an area including the feature.
  • Each feature can be detected using a known technique.
  • the feature detection unit 13 outputs the image to be processed, the position of the face image, and the position of the detected facial feature to the suitability determination unit 14.
  • the feature detection unit 13 may specify the positions of the features of the plurality of face images and output the positions of the features of the plurality of face images to the suitability determination unit 14.
  • the suitability determination unit 14 determines whether or not the face image is suitable for performing the makeup process from the processing target image, the face image position, and the face feature position received from the feature detection unit 13. For example, the suitability determination unit 14 determines a face image that faces sideways, a face image that is too small, and the like as inappropriate. A specific determination method will be described later. When a plurality of face images are included in the image to be processed, the suitability determination unit 14 may determine the suitability of performing the makeup process on each face image, or more suitable for performing the makeup process. A predetermined number (for example, one) of face images may be specified. The suitability determining unit 14 outputs the image to be processed, the position of the face image determined to be appropriate as the processing target, and the position of the facial feature to the makeup shape determining unit 15.
  • the makeup shape determination unit 15 is based on the processing target image received from the suitability determination unit 14, the position of the processing target face image, the position of the facial feature, and the makeup processing instruction received from the image acquisition unit 11. Then, the shape of the makeup (pattern) to be performed on the face image to be processed and the density distribution thereof are determined.
  • the makeup color designated by the user is combined with the skin color of the original face image according to the calculated weight distribution.
  • the weight distribution indicates a distribution of makeup shades for each pixel.
  • the makeup shape determination unit 15 specifies a weight distribution used for color synthesis as the makeup shape and the light / dark distribution.
  • the makeup shape determination unit 15 includes a shape adjustment unit 21, a skin identification unit 22, a mask unit 23, and a weight distribution determination unit 24.
  • the shape adjusting unit 21 determines the type of makeup (eyeline, blusher, etc.) and its basic shape based on the makeup processing instruction.
  • the shape adjusting unit 21 specifies a makeup basic shape to be used for the makeup process based on a makeup processing instruction among a plurality of makeup basic shapes prepared in advance.
  • the shape adjusting unit 21 may calculate the makeup basic shape by calculation using a predetermined function every time the makeup process is performed. Further, a makeup basic shape template may be used by changing the shape, density distribution and the like according to a user instruction.
  • FIG. 2 is an image showing an example of the basic shape of the upper eyeline.
  • FIG. 3 is an image showing an example of the basic shape of the lower eyelid eyeline.
  • FIG. 4 is an image showing an example of the basic shape of the eye shadow.
  • FIG. 5 is an image showing an example of the basic shape of blusher. 2 to 5, a bright (white) portion indicates that the makeup color is dark, and a dark (black) portion indicates that the makeup color is light. That is, the basic shape of the makeup represents the shape of the makeup and the shading.
  • the basic shape of the eyelid eyeline shown in FIG. 2 has a value of 0 to 1 for each pixel, and the larger the value is, the brighter the pixel is.
  • the basic shape of the makeup shown in FIGS. 2 to 5 is for the right eye or the right cheek. If the left and right are reversed, the basic shape for the left eye or the right cheek is obtained.
  • the shape adjusting unit 21 deforms the makeup basic shape to be used according to the characteristics of the face image. For example, the shape adjusting unit 21 adjusts (scales) the size of the makeup basic shape used according to the size of the face image or the size of the eyes. In addition, the shape adjusting unit 21 is configured so that, for example, the lower outline (white portion) of the upper eyelid eyeline shown in FIG. Adjust the makeup shape. In this way, the shape adjusting unit 21 adjusts the makeup shape according to each feature.
  • FIG. 6 is an image showing the makeup shape after the shape adjustment. Similar to FIGS. 2 to 5, in FIG. 6, a bright (white) portion indicates that the makeup color is dark, and a dark (black) portion indicates that the makeup color is light.
  • the shape adjusting unit 21 outputs the makeup shape adjusted in size and shape to the weight distribution determining unit 24.
  • the skin identification unit 22 identifies a part that is skin in the face image.
  • the skin specifying unit 22 determines that a pixel whose pixel color is considered to be a skin color is skin. Specifically, the skin specifying unit 22 specifies the skin color degree for each pixel of the face image to be processed. In the present embodiment, for a portion having a low skin color degree, that is, a portion considered not to be skin, the weight is reduced and the makeup color is overlapped thinly, or the makeup color is hardly synthesized.
  • the skin specifying unit 22 outputs the skin color level of each pixel of the face image to be processed to the weight distribution determining unit 24.
  • the mask unit 23 generates a mask for the eye part (predetermined part) from the face image to be processed and the position of the feature.
  • a makeup shape such as an eyeline is adjusted by the shape adjusting unit 21 according to the contour of the eye. If the detected position of the eye contour is shifted from the original position, the eyeline or the like is in the eye. May get in.
  • an eyeline or the like is prevented from accidentally entering the eye.
  • the mask unit 23 generates a mask using information on the eye contour obtained by an algorithm different from the eye contour used by the shape adjusting unit 21. By doing so, it is possible to prevent a problem (eye line or the like from entering the eye) that occurs in the shape adjusting unit 21 due to a detection error.
  • the generated mask has a value between 0 and 1 for each pixel. Here, it means that the part where the mask value is 1 is not masked, and that the part where the value is small is strongly masked (makeup color is not synthesized). In addition, you may produce
  • the mask unit 23 outputs the generated mask to the weight distribution determination unit 24.
  • the weight distribution determination unit 24 determines a weight distribution used for color composition (composition of makeup color and skin color) based on the adjusted makeup shape, the skin color degree of the face image, and the mask. Specifically, the weight distribution determination unit 24 calculates the product of the makeup shape, the skin color degree, and the mask for each pixel corresponding to the face image, and sets this product as the weight in each pixel.
  • the weight distribution for color synthesis indicates that a portion having a smaller weight value is combined with a lighter makeup color, and a portion having a larger weight value is combined with a darker makeup color.
  • the weight distribution determination unit 24 outputs the determined weight distribution to the synthesis unit 17. In addition, the weight distribution determination unit 24 outputs the processing target image, the position of the processing target face image, and the position of the facial feature to the color correction unit 16.
  • the color correction unit 16 identifies the representative color of the skin color of the processing target face image based on the processing target image, the position of the processing target face image, and the position of the facial feature.
  • a partial color of the face area for example, an average color, a median value, a mode value color, or the like of the center part (near the nose) of the face area may be used as the representative color of the skin color. Further, the average color or the like of the entire face area may be used as the representative color of the skin color.
  • an average color of an area having a face is obtained, pixels having a hue different from the average color in the area (an angle with the average color in the CbCr plane is larger than a threshold value), and / or the average color in the area
  • the pixels having a large color difference may be excluded, and the average color calculated from the remaining pixels may be used as the representative color.
  • the color correction unit 16 corrects the makeup color designated by the user for each pixel of the face image using the color of each pixel and the representative color of the skin color.
  • the color correction unit 16 corrects the makeup color for each of the left and right makeup areas so that the difference in color between the left and right makeup areas after synthesis is reduced according to the difference in the representative colors of the left and right makeup areas.
  • the color correction unit 16 outputs the makeup color corrected for each pixel to the synthesis unit 17.
  • the color correction unit 16 outputs the processing target image and the position of the processing target face image to the combining unit 17.
  • the synthesizing unit 17 synthesizes the face image to be processed and the corrected makeup color according to the weight distribution, and generates a face image subjected to the makeup process.
  • the composition unit 17 outputs the makeup-processed image to the display control unit 18. Note that the composition unit 17 may output and store the makeup-processed image in the image storage device 4.
  • the display control unit 18 outputs the makeup-processed image to the display device 5 and controls the display device 5 to display the makeup-processed image.
  • the user selects an image to be processed from, for example, images captured and stored in the image storage device 4 via the instruction input device 2.
  • the user can specify the type of makeup (eyeline, eyeshadow, and / or blusher, etc.), the shape of each makeup, and each makeup color applied to the image to be processed via the instruction input device 2. Select from multiple candidates.
  • the instruction input device 2 outputs a makeup processing instruction including information indicating the type of makeup, the shape of the makeup, and the makeup color to the image acquisition unit 11 of the image processing device 6.
  • FIG. 7 is a flowchart showing the flow of makeup processing in the image processing apparatus 6.
  • the image acquisition unit (instruction receiving unit) 11 receives an instruction for the makeup process from the instruction input device 2 and acquires an image to be processed from the image storage device 4 (S1).
  • the face detection unit 12 detects a face image included in the image to be processed and specifies the position of the face image (S2).
  • the face detection unit 12 may detect a plurality of face images included in the processing target image.
  • Feature detection unit 13 detects the position of the facial feature included in the detected facial image (S3).
  • the feature detection unit 13 is a facial organ such as an eye (eye, eye corner, upper eyelid contour point, lower eyelid contour point, etc.), mouth (mouth end point, mouth center point, etc.), and nose (apex of the nose, etc.).
  • Features (feature points) are detected and their positions are specified.
  • the feature detection unit 13 may detect a feature such as a face outline.
  • the suitability determination unit 14 determines whether or not the face image is suitable for performing a makeup process based on the detected positions of the facial features (S4). For example, the suitability determination unit 14 stores a face model created by learning in advance the luminance distribution features around the features of facial organs such as eyes, nose and mouth from a plurality of face image samples. The suitability determination unit 14 compares the face model with the detected face image to identify the reliability of the detected feature of the face image and the face orientation.
  • the suitability determination unit 14 determines that the face image is not suitable for performing the makeup process.
  • the suitability determination unit 14 determines that the face image is not suitable for performing the makeup process.
  • the makeup process may not be performed properly.
  • the determination unit 14 determines that the face image is not suitable for performing the makeup process.
  • the suitability determination unit 14 performs the makeup process on the face image. It is determined that it is not suitable.
  • the suitability determination unit 14 may determine that the face image is not suitable for performing the makeup process.
  • the suitability determination unit 14 may determine that the face image is not suitable for performing the makeup process.
  • the feature detection unit 13 may erroneously detect the object as a feature point of the face.
  • the detected feature point is in an unnatural position compared to other feature points (eyes, nose, mouth, etc.)
  • the detected feature point is that of another object overlapping the face Can be determined.
  • the suitability determination unit 14 uses the makeup process for the face image. You may determine that it is not suitable.
  • the determination criteria may differ depending on the type of makeup (eyeline, eyeshadow, blusher, etc.).
  • the shape adjusting unit 21 acquires information on the skin color of the face image to be processed (S5).
  • skin color information the average color of the entire skin and the average color of each region such as starboard, portside, right cheek, left cheek, and nose are obtained from the face image to be processed.
  • the shape adjusting unit 21 sets the processing target to the eyes or the cheeks according to the type of the instructed makeup (S6). In addition, when it is instructed to apply a plurality of makeups, a site to be processed is set according to the type of unprocessed makeup.
  • the shape adjusting unit 21 sets one of the left and right organs as a processing target (S7).
  • the shape adjustment unit 21 sets the processing target to the right organ (right eye or right cheek).
  • the processing target is set to the left organ (left eye or left cheek).
  • the weight distribution used for the eye makeup processing (eyeline, eyeshadow, etc.) is calculated (S9).
  • FIG. 8 is a flowchart showing a detailed flow of processing for calculating a weight distribution used for eye makeup processing.
  • the shape adjusting unit 21 determines the basic shape of the makeup used for the makeup process (S21). For example, in the basic shape of the eye shadow, as shown in FIG. 4, the lower weight close to the outline of the eye is large (the color of the eye shadow is dark), and the weight gradually decreases as the distance from the eye shadow increases (the eye shadow is Weight distribution).
  • the shape adjustment unit 21 may deform a basic shape such as an eye shadow or adjust the distribution of weights according to a makeup processing instruction.
  • the shape adjusting unit 21 may calculate a makeup basic shape by calculation using a predetermined function, or may select a makeup basic shape to be used from a template of a makeup basic shape prepared in advance.
  • the shape adjusting unit 21 deforms the basic makeup shape to be used according to the detected eye characteristics so as to match the eye shape of the face image (S22).
  • the shape adjustment unit 21 uses the information on the detected eye characteristics (the eye head, the corner of the eye, the outline of the eye, etc.) to make the size of the makeup basic shape to be used suitable for the eye size of the face image. Change to size.
  • the shape adjusting unit 21 is configured so that some representative points of the detected upper eyelid contour coincide with corresponding points of the makeup basic shape whose size has been adjusted. Then, the makeup basic shape whose size is adjusted is deformed, and the arrangement in the face image is determined.
  • the portions other than the points corresponding to the representative points in the makeup basic shape may be deformed using linear interpolation, or may be deformed using high-order function interpolation such as a cubic B-spline function.
  • the makeup shape whose size and shape are adjusted is used as a weight when combining makeup colors.
  • the skin specifying unit 22 specifies the skin color level for each pixel of the face image to be processed (S23).
  • the skin specifying unit 22 may specify the skin color degree only for a part of the face image to be processed including the periphery where the makeup process is performed.
  • the skin color degree is calculated by using the distance in the color space between the representative color representing the skin color of the face image to be processed and the color of each pixel.
  • the average skin color of the entire face area may be used as the representative skin color.
  • an average color around the nose may be used as the skin representative color.
  • the skin color level is maximized when the pixel color is the same as the representative color of the skin color (distance 0), and decreases as the distance in the color space increases.
  • the skin specifying unit 22 acquires the average color near the nose and sets it as the representative color (Yc, Cbc, Crc) of the skin of the face image.
  • the YCbCr color space is used as the color space.
  • the present invention is not limited to this, and any color space can be used.
  • the L * a * b * color space may be used.
  • the skin specifying unit 22 uses the representative color (Yc, Cbc, Crc) of the skin of the face image as the center of the skin color, and each pixel value (Y, Cb, Cr) of the face image in the color space and the skin of the face image The distance from the representative colors (Yc, Cbc, Crc) is obtained.
  • the skin color degree Ds is obtained for each pixel so that the value is 1 when the distance is 0 and the value is 0 when the distance is infinite.
  • the formula for obtaining the skin color degree Ds can be set as follows.
  • is a constant that determines the skin color range.
  • the above equation for obtaining the skin color degree Ds using exp is an example, and an exponential function that monotonously decreases with respect to distance, a sigmoid function, or the like may be used.
  • the skin color degree Ds has a value of 0 to 1, and a portion having a large value is a portion having a color close to the representative color of the skin.
  • the skin color degree Ds may be calculated from the average color of each block including a plurality of pixels.
  • the skin specifying unit 22 compares the distance in the color space with a threshold value to specify whether each pixel is skin, and sets the skin color degree value specified as not skin to 0. You may make it not make a makeup color apply to the location which is not.
  • FIG. 9 is an image showing an example of the skin color degree Ds obtained for the face image.
  • a bright (white) part indicates a part where the skin color degree Ds is large, and a dark (black) part indicates a part where the skin color degree Ds is small.
  • FIG. 9 shows the skin color degree Ds around the right eye. Since the skin color degree Ds is used as a weight when the makeup color is synthesized, the makeup color is darkly superposed at a place where the value of the skin color degree Ds is large (bright place). On the contrary, the makeup color is thinly overlapped or hardly overlapped at a portion where the skin color degree Ds is small and is not considered to be skin (dark portion). Therefore, as can be seen from FIG.
  • the makeup color is not synthesized with the pupil and the eyebrows having a low skin color level. Further, when wearing spectacles or the like, it is possible to prevent the makeup color from being combined with the spectacles. Further, when the hair is close to the eyes, it is possible to prevent the makeup color from being combined with the hair.
  • the mask unit 23 generates a mask for the eye part (S24). Specifically, an ellipse that passes through a point on the upper eyelid side, the top of the eye, and the corner of the eye corner is obtained with the line connecting the eye point and the corner of the eye as the major axis. The border of the mask on the heel side. Similarly, an ellipse that passes through one point of the lower eyelid side, the eye point, and the eye corner point is defined by taking the line connecting the eye point and the eye corner point as the major axis, and the lower arc of the ellipse is lowered. The border of the mask on the heel side. The inside of the mask surrounded by the upper and lower boundary lines is defined as a mask area.
  • the mask unit 23 is configured such that the mask value at the midpoint (center of the mask area) of the corner of the eye and the top of the eye is 0, the mask value on the boundary of the mask area is 1, and the center of the mask area according to the Gaussian distribution
  • the mask value of each pixel in the mask area is set so that the mask value increases as the distance from the mask increases. Note that instead of the Gaussian distribution, the mask value may be changed linearly, or the mask value may be changed using another function or table. Further, the mask may not be an ellipse but may have another shape.
  • FIG. 10 is an image showing an example of an eye mask corresponding to FIG.
  • a bright (white) location indicates a location with a large mask value
  • a dark (black) location indicates a location with a small mask value. Since the mask value is used as a weight when combining the makeup color, a portion where the mask value is small (dark portion) is strongly masked, and the makeup color is hardly combined. On the contrary, the mask is weak at a portion where the mask value is large (bright portion), and the makeup color is synthesized without being masked.
  • the weight determination unit 24 combines each element representing the weight distribution, that is, the makeup shape whose size and shape are adjusted, the skin color degree Ds, and the mask to obtain a weight distribution used for color synthesis (S25). . Specifically, the weight determination unit 24 obtains, as the weight distribution, the product of the makeup shape whose size and shape are adjusted, the skin color degree Ds, and the mask for each pixel.
  • FIG. 11 is an image showing the product of the skin color degree Ds and the mask corresponding to FIG. Compared with FIG. 9, it can be seen that the eye portion is masked by the mask. It should be noted that the makeup color is overlaid darker for pixels that are brightly shown in FIG.
  • the weight determination unit 24 may determine whether each pixel is skin by comparing the product of the skin color degree Ds and the mask with a predetermined threshold (for example, 0.5). . Then, for example, the value of a pixel determined to be skin may be 1, and the value of a pixel determined to be non-skin may be 0 to binarize the weight. Alternatively, the weight may be set to 0 only for pixels whose products are smaller than a predetermined threshold.
  • a predetermined threshold for example, 0.5
  • FIG. 12 is an image showing the weight distribution corresponding to FIG.
  • the weight distribution is a product of the adjusted makeup shape, the skin color degree Ds, and the mask
  • FIG. 12 shows a weight distribution obtained by multiplying the weight shown in FIG. 6 and the weight shown in FIG. 11 for each pixel.
  • a bright (white) location indicates a location with a large weight
  • a dark (black) location indicates a location with a low weight.
  • What is shown in FIG. 12 is the final weight, and a bright (white) portion is darkly painted. This completes the calculation process of the weight distribution used for the eye makeup process.
  • FIG. 13 is a flowchart showing a detailed flow of the process of calculating the weight distribution used for the cheek makeup process.
  • the point that the mask processing of the eyes is not required is different, but the other processing is the same as in the case of the eyes, and thus will be described briefly.
  • the shape adjusting unit 21 determines the basic shape of the makeup used for the makeup process (S31). For example, in the basic shape of blusher, as shown in FIG. 5, the weight near the center of the blusher application region is the largest (blusher color is dark), and the weight gradually decreases as the distance from the center decreases (blusher color is lighter). A weight distribution.
  • the shape adjusting unit 21 deforms the basic makeup shape to be used according to the detected eye, mouth, and nose characteristics so as to match the shape of the cheek of the face image (S32).
  • the shape adjusting unit 21 changes the size of the makeup basic shape to be used to a size suitable for the size of the cheek of the face image based on the positional relationship of the detected features such as eyes, mouth, and nose. .
  • the shape adjusting unit 21 estimates the positions of some representative points on the cheek from the positional relationship of features such as eyes, mouth, and nose.
  • the shape adjusting unit 21 deforms the makeup basic shape whose size has been adjusted so that the representative point and the corresponding point of the makeup basic shape whose size has been adjusted respectively match.
  • the skin specifying unit 22 specifies the skin color degree Ds for each pixel of the face image to be processed (S33). This process is the same as in the eye makeup process.
  • the weight determination unit 24 combines each element representing the weight distribution, that is, the makeup shape whose size and shape are adjusted, and the skin color degree Ds to obtain a weight distribution used for color synthesis (S34). Specifically, the weight determination unit 24 obtains the product of the makeup shape whose size and shape are adjusted and the skin color degree Ds for each pixel as the weight distribution. This completes the calculation process of the weight distribution used for the cheek makeup process.
  • the color correction unit 16 corrects the makeup color designated by the user and obtains a makeup color corrected for each pixel used for composition (S11).
  • the color correction unit 16 performs correction based on the difference in color of each pixel in the heel area (or cheek area) and correction based on the difference in brightness (luminance) between the left and right heel areas (or cheek areas).
  • the color correction unit 16 acquires a representative color (Yo, Cbo, Cro) of the skin color of the area to be applied.
  • the representative color of the skin color may be an average color of the region. Moreover, you may use the average color of the skin color of the whole face area
  • the YCbCr color space is used as the color space, but the present invention is not limited to this.
  • the color correction unit 16 obtains ⁇ and r from the makeup colors (Ys, Cbs, Crs) specified by the user and the representative colors (Yo, Cbo, Cro) of the skin color.
  • is an angle formed by the vector (Cbs, Crs) and the vector (Cbo, Cro) on the CbCr plane.
  • R Ys / Yo.
  • can be said to be a difference in hue or hue between the makeup color and the representative color of the skin.
  • R represents the ratio of the luminance between the makeup color and the representative color of the skin color.
  • the color correction unit 16 obtains, for each pixel, a makeup color (Y ′, Cb ′, Cr ′) that is superimposed (synthesized) on each pixel value (Y, Cb, Cr) of the face image.
  • Cb ′ and Cr ′ are determined so that the angle formed by the vector (Cb ′, Cr ′) and the vector (Cb, Cr) in the CbCr plane is ⁇ .
  • the color correction unit 16 uses the luminance ratio and the hue difference between the makeup color designated by the user and the representative color of the skin, and uses the difference in hue according to the skin color (each pixel value) of the face image.
  • the corrected makeup colors (Y ′, Cb ′, Cr ′) are obtained. Note that the makeup color may be corrected using only one of the luminance ratio (or difference) and the hue difference.
  • FIG. 14 is a diagram showing a relationship in the color space between the corrected makeup color (Y ′, Cb ′, Cr ′) and the corresponding pixel value (Y, Cb, Cr) of the face image.
  • the relationship ( ⁇ , r) in the color space between each pixel value (Y, Cb, Cr) of the face image and the corresponding corrected makeup color (Y ′, Cb ′, Cr ′). Is the same as the relationship between the representative colors (Yo, Cbo, Cro) of the skin color and the makeup colors (Ys, Cbs, Crs) specified by the user, Correct the makeup color.
  • the makeup color designated by the user may be used as it is without correcting each pixel.
  • ⁇ (0 ⁇ ⁇ ⁇ 0.5) is a parameter for adjusting the difference in the appearance of the left and right makeups, and may be set in advance for each type of makeup or specified by the user. Good.
  • the makeup color may be corrected using a representative luminance (representative color) representative of the brightness of the makeup area, such as the median luminance of the left and right makeup areas.
  • the makeup image (Y ′, Cb ′, Cr ′) after correction for each pixel is used as the face image.
  • the makeup color may look different on the left and right. Therefore, the luminance Y ′ of the makeup color is corrected so that the luminance difference between the left and right of the makeup color is reduced, and Yl ′ and Yr ′ are obtained.
  • the synthesizer 17 applies (colors) the makeup color to the face image by synthesizing (superimposing) the corrected makeup color on the color of the face image to be processed using the weight distribution (S12). More specifically, the combining unit 17 combines each pixel with the corrected makeup color by multiplying the weight w of the pixel with the color of the pixel of the face image.
  • the color (Ya, Cba, Cra) of each pixel after synthesis is obtained using, for example, the following equation.
  • Ya (1 ⁇ ⁇ w) ⁇ Y + ⁇ ⁇ w ⁇ Yl ′ (for port side, left cheek)
  • Ya (1 ⁇ ⁇ w) ⁇ Y + ⁇ ⁇ w ⁇ Yr ′ (in the case of starboard, right cheek)
  • Cba (1-w) ⁇ Cb + w ⁇ Cb ′
  • Cra (1-w) ⁇ Cr + w ⁇ Cr ′
  • w is a weight for each pixel
  • ⁇ (0 ⁇ ⁇ 1) is a parameter for adjusting the weight for luminance.
  • the change in luminance has a large visual influence, and when the luminance is greatly changed by makeup, it looks unnatural. Therefore, the synthesis unit 17 suppresses the change in luminance due to the makeup and synthesizes the makeup color with the face image.
  • the display control unit 18 displays the image after the makeup process on the display device 5 and ends the makeup process.
  • the skin color degree of the face image to be processed is determined, and the makeup process is performed on the portion considered to be skin according to the skin color degree.
  • the weight of the makeup process is reduced or the makeup process is not performed. Therefore, even when a part of the area to be made up is covered with other objects such as glasses or hair, it is possible to prevent other objects from being applied with makeup, and to apply makeup only to the skin for natural makeup processing. An image can be obtained.
  • the makeup process is performed according to the skin color degree, so that it is possible to prevent the makeup process from being performed in the eyes or out of the face range. Therefore, the user can easily perform the makeup simulation only by selecting the type, shape, color, etc. of the makeup first.
  • the detected feature points (eye corners, eye corners, eye contours) due to individual differences in eye contour shape, face orientation of the face image is not front, or the eye contour is not clear due to lighting.
  • An error may occur in the position of a point.
  • an eyeline or eyeshadow may enter the eye.
  • the mask unit 23 defines the eye region and masks the eye region by a method different from the method in which the shape adjusting unit 21 adjusts the makeup shape. For this reason, even when the makeup shape is arranged so as to overlap the eye, the eye region is masked, so that the makeup can be prevented from entering the eye.
  • the left and right illuminations are not uniformly applied during imaging, and the left and right skins may not have the same brightness due to shadows on either the left or right side of the face image.
  • combining the same makeup color with different skin colors on the left and right reflects the skin color difference, and the combined makeup color is different on the left and right. It may look like
  • the makeup color to be applied to each of the left and right makeup regions is corrected according to the difference in skin color between the left and right makeup regions, and the makeup color used for the synthesis is changed to a different color on the left and right.
  • the difference in color of the makeup region after the makeup has been synthesized can be reduced, and a natural-looking makeup process can be performed.
  • the makeup process is performed on the face image determined to be suitable. Therefore, failure due to the makeup process can be prevented, and the makeup process can be performed only on the face image suitable for the makeup.
  • a digital camera provided with an image processing apparatus has been described as an example.
  • the present invention is not limited to this, and the present invention can also be applied to a digital video camera, a camera-equipped mobile phone, a computer, and the like.
  • the captured image may be acquired via a web camera, a network, a removable storage device, or the like.
  • the makeup process may be performed not only on the captured still image but also on a face image such as a moving image.
  • a make-up process may be performed on a preview image displayed on the display device of the digital camera when imaging is performed with the digital camera.
  • an arbitrary pattern may be synthesized on the face or skin of a person image.
  • the applied makeup color is corrected to a different color on the left and right so that the difference in color (brightness) between the left and right makeup areas after synthesis is reduced.
  • the same makeup color is not limited to the left and right.
  • the difference in the skin color of each makeup area (for example, the difference from the average skin color of each makeup area) so that the difference in color (luminance) of the plurality of makeup areas after synthesis is reduced in a plurality of different makeup areas to be applied. ) May be used to correct the makeup color to be applied for each makeup region.
  • An image processing apparatus is an image processing apparatus that performs a process of coloring a pattern of a certain color on the skin of a person image, and in order to solve the above-described problem, at least a partial region of the person image For each part, a skin specifying part that specifies the skin color degree of the color in the person image, and a coloring part that colors the pattern in the person image according to the density corresponding to the skin color degree are provided. .
  • An image processing method is an image processing method that performs a process of coloring a pattern of a certain color on the skin of a person image, and in order to solve the above-described problem, at least a partial region of the person image
  • the skin color degree of each part of at least a partial region of the person image is specified, and the pattern is colored on the person image with a density corresponding to the skin color degree. Therefore, the pattern that is considered to be skin can be colored deeply, and the part that is not considered to be skin (for example, hair, glasses, etc.) can be lightly colored or not colored. Therefore, a pattern such as makeup can be appropriately colored on the skin of the person image. Therefore, for example, a makeup simulation can be performed using images taken under a wide range of conditions without preparing images with raised bangs, glasses, or illumination.
  • the image processing apparatus includes a weight distribution determining unit that determines a weight distribution reflecting the degree of the skin color of each part of the partial area of the person image, and the coloring unit determines the weight of the weight distribution.
  • a configuration may be used in which the color of the pattern is superimposed on each part of the partial area of the person image.
  • the original color of the person image and the color of the pattern are synthesized with the weight reflecting the skin color degree. Therefore, by reducing the weight of a portion that is not considered to be skin, it is possible to suppress the synthesis of the pattern color in a portion that is not skin (for example, hair, glasses, etc.).
  • the image processing apparatus includes a detection unit that detects a position of a predetermined part of the person image, and a mask unit that generates a mask that suppresses coloring of the predetermined part based on the detected position.
  • the weight distribution determining unit may determine a weight distribution reflecting the skin color degree and the mask.
  • the image processing apparatus detects whether or not the face of the person image is suitable as an object to be colored based on the detection unit that detects a position of a predetermined part of the person image and the detected position.
  • the pattern coloring process is performed, so that the failure of the pattern coloring process can be prevented. it can.
  • the suitability determination unit specifies the face direction of the person image based on the detected position, and when the face direction of the person image is within a predetermined range, the face of the person image is It may be determined that the pattern is suitable for coloring.
  • the face orientation of a person image is, for example, a sideways rather than a front side, it is difficult to color a makeup pattern on the face.
  • the face orientation of the person image is within a predetermined range, it is determined that the face of the person image is suitable as an object for coloring the pattern, so that makeup processing can be performed.
  • a person image can be determined appropriately.
  • the skin specifying unit is configured to determine the person image based on a distance in a color space between a representative color representing the skin color of the person image and colors of each part of the partial area of the person image.
  • the skin color degree may be specified for each part of the partial area.
  • region of a person image is based on whether the distance in the color space with the representative color of skin is near, ie, it is a color close to the representative color of skin.
  • the degree can be specified. Therefore, a pattern can be colored in the place considered to be skin appropriately.
  • the coloring section may color the pattern as a makeup on the face of the person image.
  • makeup can be appropriately applied to the portion of the human image that is the skin of the face.
  • An image processing apparatus is an image processing apparatus that performs a process of coloring a pattern of a certain color on the skin of a person image, and in order to solve the above-described problem, the portion of the person image that is the skin And a coloring part for coloring the pattern at a location that is the specified skin.
  • An image processing method is an image processing method for performing a process of coloring a pattern of a certain color on the skin of a person image, and in order to solve the above-described problem, a portion of the person image that is skin And a coloring step of coloring the pattern at the location of the specified skin.
  • the portion that is the skin of the person image is specified, and the pattern is colored only on the portion that is the skin of the person image. Therefore, a pattern such as makeup can be appropriately colored on the skin of the person image.
  • the image processing apparatus may be partially realized by a computer.
  • a control program that causes the image processing apparatus to be realized by the computer by causing the computer to operate as the respective units, and the control program
  • a computer-readable recording medium on which is recorded also falls within the scope of the present invention.
  • each block of the image processing device 6, particularly the image acquisition unit 11, face detection unit 12, feature detection unit 13, suitability determination unit 14, makeup shape determination unit 15, color correction unit 16, composition unit 17, display control unit 18, the shape adjusting unit 21, the skin specifying unit 22, the mask unit 23, and the weight distribution determining unit 24 may be configured by hardware logic, or by software using a CPU (central processing unit) as follows. It may be realized.
  • the image processing apparatus 6 includes a CPU that executes instructions of a control program that realizes each function, a ROM (read only memory) that stores the program, a RAM (random access memory) that develops the program, the program, and various types
  • a storage device such as a memory for storing data is provided.
  • An object of the present invention is a recording medium on which a program code (execution format program, intermediate code program, source program) of a control program of the image processing apparatus 6 which is software for realizing the functions described above is recorded so as to be readable by a computer. This can also be achieved by supplying the image processing apparatus 6 and reading and executing the program code recorded on the recording medium by the computer (or CPU or MPU (microprocessor unit)).
  • Examples of the recording medium include a tape system such as a magnetic tape and a cassette tape, a magnetic disk such as a floppy (registered trademark) disk / hard disk, a CD-ROM (compact disk-read-only memory) / MO (magneto-optical) / Disc system including optical disc such as MD (Mini Disc) / DVD (digital versatile disc) / CD-R (CD Recordable), card system such as IC card (including memory card) / optical card, or mask ROM / EPROM ( A semiconductor memory system such as erasable, programmable, read-only memory, EEPROM (electrically erasable, programmable, read-only memory) / flash ROM, or the like can be used.
  • a tape system such as a magnetic tape and a cassette tape
  • a magnetic disk such as a floppy (registered trademark) disk / hard disk
  • the image processing apparatus 6 may be configured to be connectable to a communication network, and the program code may be supplied via the communication network.
  • the communication network is not particularly limited.
  • the Internet an intranet, an extranet, a LAN (local area network), an ISDN (integrated services network, digital network), a VAN (value-added network), and a CATV (community antenna) television communication.
  • a network, a virtual private network, a telephone line network, a mobile communication network, a satellite communication network, etc. can be used.
  • the transmission medium constituting the communication network is not particularly limited.
  • IEEE institute of electrical and electronic engineering
  • USB power line carrier
  • cable TV line telephone line
  • ADSL asynchronous digital subscriber loop
  • Bluetooth registered trademark
  • 802.11 wireless high data rate
  • mobile phone network satellite line, terrestrial digital network, etc. But it is available.
  • the present invention can be used for a digital camera equipped with an image processing apparatus.

Abstract

様々な条件の顔画像に対して適切にメーキャップ処理を行うことができる画像処理装置および画像処理方法を実現することを目的とし、本発明に係る画像処理装置(6)は、顔画像の肌に、指定された色のメーキャップを合成する処理を行うものであって、顔画像の少なくとも一部の領域のピクセル毎に、顔画像における色の肌色度合いを特定する肌特定部(22)と、顔画像に、肌色度合いに応じた濃さでメーキャップを合成する合成部(17)とを備える。

Description

画像処理装置、画像処理方法、および制御プログラム
 本発明は、画像処理装置および画像処理方法に関し、特に顔画像の補正を行う画像処理装置および画像処理方法に関する。
 従来より、化粧品を利用者の顔につけたときにどのように見えるかをシミュレートするために、顔画像に仮想的にメーキャップを施す技術が知られている。
 特許文献1は、撮像した利用者の顔画像に頬紅を塗布する頬紅メーキャップシミュレーション技術を開示している。特許文献2は、撮像した利用者の顔画像にアイシャドウおよびアイラインを描く目元メーキャップシミュレーション技術を開示している。これらの技術によると、利用者の顔画像の色に頬紅またはアイシャドウ等の色を重ねて塗布するため、利用者の肌の色に応じたメーキャップを施すことができる。
日本国公開特許公報「特開2000-279228号公報(公開日:2000年10月10日公開)」 日本国公開特許公報「特開2000-285222号公報(公開日:2000年10月13日)」
 しかしながら、上記従来の構成では、下記の問題を生じる。
 特許文献1および特許文献2に記載の技術は、メーキャップシミュレーションを行うために最適な顔画像を準備することを前提としている。具体的には、上記従来の技術は、目や頬の周辺が他の物体で隠れておらず、顔の全面に均一な光が当たっている、無表情の正面の顔画像を用いることを前提としている。そのため、例えば、化粧品販売店において、まず顧客(利用者)にカメラに向かって座ってもらい、前髪を上げる、眼鏡を外す等の準備をしてもらう。その後、均一に照射されるよう配置された照明の下で、販売員が顧客の最適な顔画像を撮像し、無表情な正面の顔画像をメーキャップシミュレータに入力するということが行われる。メーキャップシミュレーションに失敗した場合は、上記の過程を繰り返すといったことが行われる。そのため、利用者は、メーキャップシミュレーションを行うために化粧品販売店に赴く必要があり、さらに販売員の補助をも必要とする。そのため、利用者がメーキャップシミュレーションを気軽に試すことができない。また、特許文献1および特許文献2に記載の技術では、普段通りの状態、すなわち前髪を下ろした状態または眼鏡をかけた状態におけるメーキャップシミュレーションを行うことができない。
 また、例えば特許文献1および特許文献2に記載の技術を、デジタルカメラまたはカメラ付き携帯電話等に適用し、撮像された顔画像にメーキャップを施すソフトウェアを実現することもできる。また、パソコンまたはインターネット上のサーバにおいて動作するメーキャップシミュレータとして適用することも考えられる。この場合は、販売員にメーキャップシミュレーションを依頼することは必要ない。
 しかしながら、特許文献1および特許文献2に記載の技術では、メーキャップシミュレーションに最適な画像、すなわち、目や頬の周辺が他の物体で隠れておらず、顔の全面に均一な光が当たっている、無表情の正面の顔画像を、利用者自らで準備する必要がある。もし、デジタルカメラまたはカメラ付き携帯電話によって撮影したスナップ写真(例えば、早撮りの、自然な状態を撮った写真)を用いて、従来の技術によるメーキャップシミュレーションを行った場合、以下のような問題が生じる。
 第1に、スナップ写真には、向きが正面ではない顔、またはわざと歪んだ表情をした顔等、そもそもメーキャップシミュレーションを行うのが困難な顔画像が含まれていることが少なくない。そのような顔画像に対して、従来の技術によるメーキャップシミュレーションを行うと、意図通りの補正を行うことができず、不自然な結果を生じてしまう。
 第2に、スナップ写真に写った顔の向きが正面に近い場合であっても、眼鏡をかけている、または髪が目の付近にかかっている等、メーキャップすべき領域の一部または全部が他の物体で覆われていることはよくあることである。そのような顔画像に対して、従来の技術によるメーキャップシミュレーションを行うと、メーキャップすべき領域に重なった他の物体に対してメーキャップを施した結果が得られるという問題が生じる。
 また、メーキャップすべき領域付近に眼鏡または髪等がなかったとしても、従来の技術では、顔の特徴点または目の輪郭等を正しく抽出できなかった場合、目にアイシャドウが入り込む等、意図しない箇所にメーキャップを施した結果が得られるという問題が生じる。
 また、スナップ写真等においては、顔に均一に光が当たっていないことも少なくなく、顔の左右の一方の側が明るく、反対側が暗くなっていることもよくあることである。そのような顔画像に対して、従来の技術によるメーキャップシミュレーションを行うと、適用するメーキャップの色(化粧品の色)によっては、不自然に見える結果を生じる。例えば、従来の技術によってアイシャドウ(または頬紅)の色と肌の色とをエアブラシ処理等によって合成して得られた色(メーキャップ後の色)の左右の差は、元の左右の肌の色の差に対して不自然に見えることがある。この問題は、特に元の左右の肌の色の明るさの違いが一見分かりにくい場合に顕著である。
 本発明は、上記の問題点に鑑みてなされたものであり、その目的は、幅広い条件の顔画像に対して適切にメーキャップ処理を行うことができる画像処理装置および画像処理方法を実現することにある。
 本発明に係る画像処理装置は、人物画像の肌に、ある色の模様を着色する処理を行う画像処理装置であって、上記の課題を解決するために、上記人物画像の少なくとも一部の領域の箇所毎に、上記人物画像における色の肌色度合いを特定する肌特定部と、上記人物画像に、上記肌色度合いに応じた濃さで上記模様を着色する着色部とを備えることを特徴としている。
 本発明に係る画像処理方法は、人物画像の肌に、ある色の模様を着色する処理を行う画像処理方法であって、上記の課題を解決するために、上記人物画像の少なくとも一部の領域の箇所毎に、上記人物画像における色の肌色度合いを特定する肌特定ステップと、上記人物画像に、上記肌色度合いに応じた濃さで上記模様を着色する着色ステップとを含むことを特徴としている。
 上記の構成によれば、人物画像の少なくとも一部の領域の各箇所の肌色度合いを特定し、肌色度合いに応じた濃さで人物画像に模様を着色する。よって、肌であると考えられる箇所については模様を濃く着色し、肌ではないと考えられる箇所(例えば髪、眼鏡等)には薄く着色する、または着色しないようにすることができる。そのため、人物画像の肌に適切にメーキャップ等の模様を着色することができる。それゆえ、例えば利用者が、前髪を上げたり、眼鏡を外したり、照明を当てたりした画像を準備しなくとも、幅広い条件で撮られた画像を用いてメーキャップシミュレーションを行うことができる。
 以上のように、本発明によれば、人物画像の各箇所の肌色度合いを特定し、肌色度合いに応じた濃さで人物画像に模様を着色する。
 そのため、人物画像の肌に適切にメーキャップ等の模様を着色することができる。それゆえ、幅広い条件で撮られた画像を用いてメーキャップシミュレーションを行うことができる。
 本発明のさらに他の目的、特徴、及び優れた点は、以下に示す記載によって十分わかるであろう。また、本発明の利益は、添付図面を参照した次の説明で明白になるであろう。
本発明の一実施の形態に係るデジタルカメラの概略構成を示すブロック図である。 上瞼用アイラインの基本形状の一例を示す画像である。 下瞼用アイラインの基本形状の一例を示す画像である。 アイシャドウの基本形状の一例を示す画像である。 頬紅の基本形状の一例を示す画像である。 形状の調整を行った後のメーキャップ形状を示す画像である。 上記デジタルカメラが備える画像処理装置におけるメーキャップ処理の流れを示すフローチャートである。 目のメーキャップ処理に使用する重み分布を算出する処理の詳細な流れを示すフローチャートである。 顔画像について求めた肌色度合いDsの例を示す画像である。 図9に対応する、目のマスクの例を示す画像である。 図9に対応する、肌色度合いDsとマスクとの積を示す画像である。 図6に対応する、重み分布を示す画像である。 頬のメーキャップ処理に使用する重み分布を算出する処理の詳細な流れを示すフローチャートである。 補正されたメーキャップ色と顔画像の対応するピクセル値との色空間における関係を示す図である。
 本実施の形態では、主に、デジタルカメラに搭載され、撮像された画像に含まれる顔画像に対してメーキャップ処理を行う画像処理装置について説明するが、本発明はこれに限定されるものではない。以下、本実施の形態について、図1~図14を参照して詳細に説明する。
 <デジタルカメラの構成>
 図1は、本実施の形態に係るデジタルカメラ1の概略構成を示すブロック図である。デジタルカメラ1は、指示入力装置2、撮像装置3、画像記憶装置4、表示装置5、および画像処理装置6を備える。
 指示入力装置2は、ボタン、キーまたはタッチパネル等の入力装置を備え、利用者から撮像の指示を受け付け、撮像装置3に撮像の指示を出力する。また、指示入力装置2は、利用者からメーキャップ処理の指示を受け付け、画像処理装置6にメーキャップ処理の指示を出力する。
 撮像装置3は、例えば、CCD(charge coupled device)またはCMOS(complementary metal oxide semiconductor)撮像素子等の撮像素子を備える。撮像装置3は、撮像の指示に応じて撮像し、撮像した画像(画像データ)を画像記憶装置4に出力する。
 画像記憶装置4は、各種の情報を記憶するものであり、例えばHDD(Hard Disk Drive)、またはフラッシュメモリ等の記憶デバイスを備える。画像記憶装置4は、撮像装置3から受け取った画像を記憶して保存しておく。
 表示装置5は、ディスプレイを備え、入力された画像を表示して利用者に提示する。また、表示装置5は、画像処理装置6からメーキャップ処理済みの画像を受け取り、メーキャップ処理済みの画像を表示する。
 <画像処理装置の構成>
 画像処理装置6は、画像取得部11、顔検出部12、特徴検出部(検出部)13、適否判定部14、メーキャップ形状決定部15、色補正部16、合成部(着色部)17、および表示制御部18を備える。
 画像取得部11は、指示入力装置2からメーキャップ処理の指示を受け取る。メーキャップ処理の指示は、処理対象となる画像を示す情報、および、どのようなメーキャップ(アイシャドウまたは頬紅、その形状、および色等)を行うかを示す情報を含む。画像取得部11は、受け取ったメーキャップ処理の指示に基づき、画像記憶装置4から処理対象の画像を取得する。なお、画像取得部11は、撮像装置3から撮像された画像を直接受け取ってもよい。画像取得部11は、取得した処理対象の画像を顔検出部12に出力する。また、画像取得部11は、メーキャップ処理の指示をメーキャップ形状決定部15に出力する。
 顔検出部12は、画像取得部11から受け取った画像の中に含まれる顔画像を検出する。顔検出部12は、画像に含まれる顔画像を検出すると、顔画像の位置を特定する。顔画像の位置は、顔画像の所定の点の座標を示してもよいし、顔画像の領域を示してもよい。顔検出部12は、処理対象の画像と顔画像の位置とを、特徴検出部13に出力する。なお、顔検出部12は、処理対象の画像から複数の顔画像を検出してもよい。複数の顔画像を検出した場合、顔検出部12は、各顔画像の位置を特定し、複数の顔画像の位置を特徴検出部13に出力してもよい。
 特徴検出部13は、顔検出部12から受け取った処理対象の画像および顔画像の位置から、該顔画像の顔の各特徴の位置を検出する。具体的には、特徴検出部13は、例えば目(目頭、目尻、上瞼輪郭点、下瞼輪郭点等)、口(口端点、口の中心点等)、および鼻(鼻の頂点等)等の顔の器官の特徴、および顔の輪郭等の特徴(特徴点)を検出し、それらの位置を特定する。特徴の位置は、特徴点の座標を示してもよいし、特徴を含む領域を示してもよい。各特徴の検出は、公知の技術を用いて行うことができる。特徴検出部13は、処理対象の画像と顔画像の位置と検出した顔の特徴の位置とを適否判定部14に出力する。なお、特徴検出部13は、複数の顔画像の特徴の位置を特定し、複数の顔画像の特徴の位置を適否判定部14に出力してもよい。
 適否判定部14は、特徴検出部13から受け取った処理対象の画像、顔画像の位置、および顔の特徴の位置から、該顔画像がメーキャップ処理を行うのに適しているか否かを判定する。例えば、適否判定部14は、横向きの顔画像および写りが小さすぎる顔画像等を、不適として判定する。具体的な判定方法は後述する。なお、処理対象の画像に複数の顔画像が含まれている場合、適否判定部14は、各顔画像についてメーキャップ処理を行うことの適否を判定してもよいし、メーキャップ処理を行うのにより適した所定数(例えば1つ)の顔画像を特定してもよい。適否判定部14は、処理対象の画像と、処理対象として適切と判定した顔画像の位置と、その顔の特徴の位置とをメーキャップ形状決定部15に出力する。
 メーキャップ形状決定部15は、適否判定部14から受け取った処理対象の画像、処理対象の顔画像の位置、およびその顔の特徴の位置と、画像取得部11から受け取ったメーキャップ処理の指示とに基づき、処理対象の顔画像に対して行うメーキャップ(模様)の形状およびその濃淡の分布を決定する。本実施の形態では、利用者によって指定されたメーキャップ色を、算出した重み分布に応じて、元の顔画像の肌の色と合成する。該重み分布はピクセル毎のメーキャップの濃淡の分布を示す。メーキャップ形状決定部15は、メーキャップの形状と濃淡の分布として、色の合成に用いる重み分布を特定する。
 メーキャップ形状決定部15は、形状調整部21、肌特定部22、マスク部23、および重み分布決定部24を備える。
 形状調整部21は、メーキャップ処理の指示に基づき、メーキャップの種類(アイラインまたは頬紅等)と、その基本形状とを決定する。形状調整部21は、あらかじめ用意された複数のメーキャップ基本形状のうち、メーキャップ処理の指示に基づいて、メーキャップ処理に使用するメーキャップ基本形状を特定する。なお、形状調整部21は、メーキャップ処理のたびにメーキャップ基本形状を所定の関数を用いて計算により算出してもよい。また、メーキャップ基本形状のテンプレートを利用者の指示によって形状および濃度分布等を変化させて用いてもよい。
 図2は、上瞼用アイラインの基本形状の一例を示す画像である。図3は、下瞼用アイラインの基本形状の一例を示す画像である。図4は、アイシャドウの基本形状の一例を示す画像である。図5は、頬紅の基本形状の一例を示す画像である。図2~5において、明るい(白い)箇所はメーキャップの色が濃いことを示し、暗い(黒い)箇所はメーキャップの色が薄いことを示す。すなわち、メーキャップの基本形状は、メーキャップの形状および濃淡を表す。例えば、図2に示す上瞼用アイラインの基本形状は、各ピクセル毎に0~1の値を持ち、値が大きいピクセルほど明るく表されており、各ピクセルの値は合成の際の重みに対応する。なお、図2~5に示すメーキャップの基本形状は右目用または右頬用のものであり、左右反転すれば左目用または右頬用の基本形状が得られる。
 形状調整部21は、使用するメーキャップ基本形状を、顔画像の特徴に応じて変形する。例えば、形状調整部21は、顔画像の大きさまたは目等の大きさに合わせて使用するメーキャップ基本形状の大きさを調整(スケーリング)する。また、形状調整部21は、検出した目の輪郭の形状に応じて、例えば検出した上瞼の輪郭に図2に示す上瞼用アイラインの下側の輪郭(白い箇所)が沿うように、メーキャップ形状を調整する。このように、形状調整部21は、各特徴に応じてメーキャップ形状を調整する。図6は、形状の調整を行った後のメーキャップ形状を示す画像である。図2~5と同様に、図6において、明るい(白い)箇所はメーキャップの色が濃いことを示し、暗い(黒い)箇所はメーキャップの色が薄いことを示す。形状調整部21は、大きさおよび形状を調整したメーキャップ形状を重み分布決定部24に出力する。
 肌特定部22は、顔画像の中の肌である箇所を特定する。肌特定部22は、ピクセルの色が肌の色であると考えられるピクセルを、肌であると判定する。具体的には、肌特定部22は、処理対象である顔画像の各ピクセルについて、肌色度合いを特定する。本実施の形態では、肌色度合いの小さい箇所、すなわち、肌ではないと考えられる箇所については、重みを小さくしメーキャップの色を薄く重ねる、またはほとんどメーキャップの色を合成しない。肌特定部22は、処理対象の顔画像の各ピクセルの肌色度合いを重み分布決定部24に出力する。
 マスク部23は、処理対象の顔画像およびその特徴の位置から、目の部分(所定の部位)のマスクを生成する。ここで、まつげ等の影響により、特徴検出部13によって検出される目の輪郭の位置には誤差がある可能性がある。アイライン等のメーキャップ形状は、形状調整部21によって目の輪郭に応じて調整されるが、検出された目の輪郭の位置が本来の位置からずれている場合、目の中にアイライン等が入り込むことがある。本実施の形態では、顔画像の目の部分にマスクを適用することにより、アイライン等が誤って目の中に入り込むことを防止する。なお、マスク部23は、形状調整部21が利用する目の輪郭とは異なるアルゴリズムによって得た目の輪郭に関する情報を用いて、マスクを生成する。そうすることによって、検出誤差により形状調整部21で発生する不具合(アイライン等が目の中に入り込むこと)を防止することができる。本実施の形態では、生成されたマスクは、各ピクセルについて0~1の値を有する。ここで、マスクの値が1の箇所はマスクしないことを、値が小さい箇所ほど強くマスクする(メーキャップの色を合成させない)ことを意味する。なお、鼻や口等、目以外の箇所のマスクを生成してもよい。マスク部23は、生成したマスクを重み分布決定部24に出力する。
 重み分布決定部24は、調整されたメーキャップ形状、顔画像の肌色度合い、およびマスクに基づいて、色の合成(メーキャップ色と肌の色との合成)に用いる重み分布を決定する。具体的には、重み分布決定部24は、顔画像に対応する各ピクセルについて、メーキャップ形状と肌色度合いとマスクとの積を算出し、この積を各ピクセルにおける重みとする。ここでは、色の合成のための重み分布は、重みの値が小さい箇所ほどメーキャップ色を薄く合成し、重みの値が大きい箇所ほどメーキャップ色を濃く合成するということを示す。重み分布決定部24は、決定した重み分布を合成部17に出力する。また、重み分布決定部24は、処理対象の画像、処理対象の顔画像の位置、およびその顔の特徴の位置を色補正部16に出力する。
 色補正部16は、処理対象の画像、処理対象の顔画像の位置、およびその顔の特徴の位置に基づいて、処理対象の顔画像の肌の色の代表色を特定する。顔領域の一部の色、例えば、顔領域の中心部分(鼻付近)の平均色、中央値、または最頻値の色等を肌の色の代表色としてもよい。また、顔領域全体の平均色等を肌の色の代表色としてもよい。また、顔のある領域の平均色を求め、該領域において該平均色と色相が異なる(CbCr平面における該平均色との角度が閾値より大きい)ピクセル、および/または、該領域において該平均色との色の差が大きい(YCbCr色空間における該平均色との距離が閾値より大きい)ピクセルを除外して、残りのピクセルから算出した平均色を、代表色としてもよい。色補正部16は、顔画像の各ピクセルについて、各ピクセルの色と肌の色の代表色とを用いて、利用者が指定したメーキャップ色を補正する。また、色補正部16は、左右のメーキャップ領域の代表色の差異に応じて、合成後の左右のメーキャップ領域の色の差が小さくなるように、左右のメーキャップ領域毎にメーキャップ色を補正する。色補正部16は、ピクセル毎に補正されたメーキャップ色を、合成部17に出力する。また、色補正部16は、処理対象の画像、および処理対象の顔画像の位置を合成部17に出力する。
 合成部17は、処理対象の顔画像と、補正されたメーキャップ色とを、重み分布に応じて合成し、メーキャップ処理を施した顔画像を生成する。合成部17は、メーキャップ処理済みの画像を表示制御部18に出力する。なお、合成部17は、メーキャップ処理済みの画像を画像記憶装置4に出力して記憶させてもよい。
 表示制御部18は、メーキャップ処理済みの画像を表示装置5に出力し、メーキャップ処理済みの画像を表示するよう表示装置5を制御する。
 <画像処理フロー>
 以下に、デジタルカメラ1におけるメーキャップ処理の流れについて説明する。
 利用者は、指示入力装置2を介して、例えば撮像されて画像記憶装置4に記憶されている画像の中から、処理対象の画像を選択する。また、利用者は、指示入力装置2を介して、処理対象の画像に施すメーキャップの種類(アイライン、アイシャドウ、および/または頬紅等)と、各メーキャップの形状と、各メーキャップ色とを、複数の候補の中から選択する。指示入力装置2は、メーキャップの種類、メーキャップの形状、およびメーキャップ色を示す情報を含むメーキャップ処理の指示を、画像処理装置6の画像取得部11に出力する。
 図7は、画像処理装置6におけるメーキャップ処理の流れを示すフローチャートである。
 画像取得部(指示受領部)11は、指示入力装置2からのメーキャップ処理の指示を受け取ると、画像記憶装置4から処理対象となる画像を取得する(S1)。
 顔検出部12は、処理対象となる画像に含まれる顔画像を検出し、その顔画像の位置を特定する(S2)。顔検出部12は、処理対象の画像に含まれる複数の顔画像を検出してもよい。
 特徴検出部13は、検出された顔画像に含まれる、顔の特徴の位置を検出する(S3)。特徴検出部13は、例えば目(目頭、目尻、上瞼輪郭点、下瞼輪郭点等)、口(口端点、口の中心点等)、および鼻(鼻の頂点等)等の顔の器官の特徴(特徴点)を検出し、それらの位置を特定する。なお、特徴検出部13は、顔の輪郭等の特徴を検出してもよい。
 適否判定部14は、これらの検出された顔の特徴の位置に基づき、該顔画像がメーキャップ処理を行うのに適しているか否かを判定する(S4)。例えば、適否判定部14は、複数の顔画像サンプルから目、鼻、口等の顔の器官の各特徴の周辺の輝度分布の特徴をあらかじめ学習して作成した顔モデルを記憶しておく。適否判定部14は、顔モデルと、検出された顔画像とを比較することにより、顔画像の検出された特徴の信頼度および顔の向きを特定する。
 例えば検出された特徴の信頼度が、所定の閾値よりも低い場合、顔の特徴を正確に検出していない可能性が高いので、適切にメーキャップ処理を行うことができない可能性がある。そのため、検出された特徴の信頼度が、所定の閾値よりも低い場合、適否判定部14は、該顔画像はメーキャップ処理を行うのに適していないと判定する。
 また、検出された顔の向きが正面に対して大きくずれている場合(顔の向きが所定の範囲内にない場合、例えば顔の向きが正面に対して所定の角度より大きい場合)、適切にメーキャップ処理を行うことができない可能性があるため、適否判定部14は、該顔画像はメーキャップ処理を行うのに適していないと判定する。
 また、顔画像が小さすぎる場合(例えば検出した左右の目(瞳)の中心点の間の距離が所定の閾値より小さい場合)、適切にメーキャップ処理を行うことができない可能性があるため、適否判定部14は、該顔画像はメーキャップ処理を行うのに適していないと判定する。
 また、検出した目の輪郭から、目が閉じられていると判断できる場合、適切にメーキャップ処理を行うことができない可能性があるため、適否判定部14は、該顔画像はメーキャップ処理を行うのに適していないと判定する。
 また、照明の反射により、肌の色が白くなっている箇所にメーキャップ処理を施すと、メーキャップ箇所が不自然に浮いて見えることがある。よって、顔画像の肌の色の代表色の輝度が所定の閾値よりも高い場合、適否判定部14は、該顔画像はメーキャップ処理を行うのに適していないと判定してもよい。
 また、木漏れ日が顔に当たっていること等により、頬または瞼の領域の輝度分布がまだらになっていて、その輝度差が極端に大きい場合、メーキャップ処理を施すと不自然に見えることがある。よって、顔領域の肌の色の輝度の分散が所定の閾値より大きい場合、適否判定部14は、該顔画像はメーキャップ処理を行うのに適していないと判定してもよい。
 また、肌の色に近い物体が顔画像に重なっている場合、特徴検出部13は、その物体を顔の特徴点として誤検出することがある。検出された特徴点の位置が、他の特徴点(目、鼻、口等)に比べて不自然な位置にある場合、その検出された特徴点は顔に重なる他の物体のものであると判定することができる。そのような特徴点が検出された場合、メーキャップ処理を施すと顔に重なる他の物体にまでメーキャップを合成する可能性があるので、適否判定部14は、該顔画像はメーキャップ処理を行うのに適していないと判定してもよい。
 なお、メーキャップ処理を行うことができるか否かの判定において、メーキャップの種類(アイライン、アイシャドウ、頬紅等)によって判定基準が異なっていてもよい。
 メーキャップ処理を行うのに適していないと判定された場合(S4でNo)、該顔画像に対する処理は終了する。
 メーキャップ処理を行うのに適していると判定された場合(S4でYes)、次に形状調整部21は、処理対象の顔画像の肌の色の情報を取得する(S5)。肌の色の情報として、処理対象の顔画像から、肌全体の平均色と、右瞼、左瞼、右頬、左頬、および鼻等の各領域の平均色とを求める。なお、平均ではなく、各領域の代表となる色を求めてもよい。
 形状調整部21は、指示されたメーキャップの種類に応じて、処理対象を目または頬に設定する(S6)。なお、複数のメーキャップを施すことが指示されている場合、未処理のメーキャップの種類に応じて、処理対象の部位を設定する。
 形状調整部21は、左右の器官のいずれかを処理対象として設定する(S7)。例えば、形状調整部21は、処理対象を右器官(右目または右頬)に設定する。既に右器官に対するメーキャップ処理が完了している場合、処理対象を左器官(左目または左頬)に設定する。
 処理対象が目である場合(S8でYes)、目のメーキャップ処理(アイライン、アイシャドウ等)に使用する重み分布を算出する(S9)。
 処理対象が頬である場合(S8でNo)、頬のメーキャップ処理(頬紅等)に使用する重み分布を算出する(S10)。
 図8は、目のメーキャップ処理に使用する重み分布を算出する処理の詳細な流れを示すフローチャートである。
 形状調整部21は、メーキャップ処理に使用するメーキャップの基本形状を決定する(S21)。例えば、アイシャドウの基本形状は、図4に示すように目の輪郭に近い下側の重みが大きく(アイシャドウの色が濃く)、そこから離れるにしたがって徐々に重みが小さくなる(アイシャドウの色が薄くなる)重み分布を有する。また、形状調整部21は、メーキャップ処理の指示によって、アイシャドウ等の基本形状を変形したり、重みの分布を調整してもよい。形状調整部21は、メーキャップ基本形状を所定の関数を用いて計算により算出してもよく、あらかじめ用意されたメーキャップ基本形状のテンプレートから使用するメーキャップ基本形状を選択してもよい。
 形状調整部21は、使用するメーキャップ基本形状を、顔画像の目の形状に適合するよう、検出された目の特徴に応じて変形する(S22)。まず、形状調整部21は、検出された目の特徴(目頭、目尻、目の輪郭等)の情報を用いて、使用するメーキャップ基本形状の大きさを、顔画像の目の大きさに適した大きさに変更する。また、上瞼用アイラインであれば、検出した上瞼輪郭のいくつかの代表点と、大きさが調整されたメーキャップ基本形状の対応する点とがそれぞれ一致するように、形状調整部21は、大きさが調整されたメーキャップ基本形状を変形し、顔画像における配置を決定する。メーキャップ基本形状の、代表点に対応する点以外の箇所は、線形補間を用いて変形させてもよいし、3次Bスプライン関数等の高次関数補間を用いて変形させてもよい。大きさおよび形状が調整されたメーキャップ形状は、メーキャップ色を合成する際の重みとして用いられる。
 肌特定部22は、処理対象の顔画像の各ピクセルについて、肌色度合いを特定する(S23)。肌特定部22は、処理対象の顔画像の、メーキャップ処理を行う周辺を含む一部の領域についてのみ肌色度合いを特定してもよい。肌色度合いは、処理対象の顔画像の肌の色を代表する代表色と各ピクセルの色との色空間における距離を用いて算出する。肌の代表色として、顔領域全体の肌の平均色を用いてもよいが、陰影がある場合には顔領域全体から肌の色を安定的に取得するのは難しい。そのため、肌の色を安定的に取得するために、肌の代表色として鼻の周辺の平均色等を用いてもよい。肌色度合いは、ピクセルの色が肌の色の代表色と同じ(距離0)の場合に値が最大になり、色空間における距離が大きくなるほど値が小さくなるようにする。
 例えば、肌特定部22は、鼻付近の平均色を取得し、該顔画像の肌の代表色(Yc,Cbc,Crc)とする。ここでは色空間としてYCbCr色空間を用いているが、これに限らず任意の色空間を用いることができ、例えばL*a*b*色空間を用いてもよい。肌特定部22は、顔画像の肌の代表色(Yc,Cbc,Crc)を肌の色の中心とし、色空間内における顔画像の各ピクセル値(Y,Cb,Cr)と顔画像の肌の代表色(Yc,Cbc,Crc)との距離を求める。ここでは、距離が0であれば値が1、距離が無限大のときに値が0となるように、各ピクセルについて肌色度合いDsを求める。例えば、肌色度合いDsを求める式は、以下のようにおくことができる。
Figure JPOXMLDOC01-appb-M000001
ここで、σは肌色の範囲を決める定数である。expを用いた肌色度合いDsを求める上式は一例であり、距離について単調減少をする指数関数、またはシグモイド型の関数等を用いてもよい。肌色度合いDsは、値が0~1になり、値が大きい箇所は肌の代表色に近い色の箇所である。なお、肌色度合いDsを、複数のピクセルを含むブロック毎に、そのブロックの平均色から算出してもよい。また、肌特定部22は、色空間における上記距離と閾値とを比較することで、各ピクセルが肌であるか否かを特定し、肌ではないと特定した肌色度合いの値を0として、肌ではない箇所にメーキャップ色を塗布させないようにしてもよい。
 図9は、顔画像について求めた肌色度合いDsの例を示す画像である。図9において、明るい(白い)箇所は肌色度合いDsの値が大きい箇所を示し、暗い(黒い)箇所は肌色度合いDsの値が小さい箇所を示す。また、図9では、右目の周辺の肌色度合いDsを示している。肌色度合いDsは、メーキャップ色を合成する際の重みとして用いられるので、肌色度合いDsの値が大きく肌であると考えられる箇所(明るい箇所)では、メーキャップ色が濃く重ねられる。逆に、肌色度合いDsの値が小さく肌ではないと考えられる箇所(暗い箇所)では、メーキャップ色は薄く重ねられる、またはほとんど重ねられない。そのため、図9からも分かるように、肌色度合いの低い瞳および眉等には、メーキャップ色は合成されない。また、眼鏡等をかけている場合、眼鏡にメーキャップ色を合成することを防ぐことができる。また、髪が目の近くにかかっている場合、髪にメーキャップ色を合成することを防ぐことができる。
 しかしながら、色の差では、白目の部分は白っぽい肌との区別がつけにくく、メーキャップ形状が正確に瞼の輪郭にフィットしていない場合、白目の部分にメーキャップ色が入り込む可能性がある。そのため、本実施の形態では、次に目をマスクする処理を行う。
 マスク部23は、目の部分のマスクを生成する(S24)。具体的には、目頭点と目尻点とを結ぶ線分を長軸とし、上瞼側の目の輪郭の一点、目頭点、および目尻点を通る楕円を求め、該楕円の上側の弧を上瞼側のマスクの境界線とする。また同様に、目頭点と目尻点とを結ぶ線分を長軸とし、下瞼側の目の輪郭の一点、目頭点、および目尻点を通る楕円を求め、該楕円の下側の弧を下瞼側のマスクの境界線とする。マスクの上下の境界線に囲まれた内部をマスク領域とする。このマスク領域は、瞼の輪郭を楕円と仮定して求めたものであるので、マスク領域を完全にマスクすると、マスク領域が顔画像の目からはみ出ていたときに瞼の境界付近にメーキャップ処理が施されないという不都合が起こる。そのため、マスク領域の端の方では弱いマスクになるようにする。マスク部23は、目尻点と目頭点の中点(マスク領域の中心)におけるマスク値が0、マスク領域の境界線上のマスク値が1になるように、かつ、ガウス分布にしたがってマスク領域の中心から離れるほどマスク値が大きくなるように、マスク領域内の各ピクセルのマスク値を設定する。なお、ガウス分布ではなく、マスク値を線形に変化させてもよいし、他の関数またはテーブルを用いてマスク値を変化させてもよい。また、マスクは楕円ではなく、他の形状であってもよい。
 図10は、図9に対応する、目のマスクの例を示す画像である。図10において、明るい(白い)箇所はマスク値が大きい箇所を示し、暗い(黒い)箇所はマスク値が小さい箇所を示す。マスク値は、メーキャップ色を合成する際の重みとして用いられるので、マスク値が小さい箇所(暗い箇所)は強くマスクされ、メーキャップ色はほとんど合成されない。逆にマスク値が大きい箇所(明るい箇所)ではマスクは弱くなり、メーキャップ色はマスクされずに合成される。
 重み決定部24は、重み分布を表す各要素、すなわち、大きさおよび形状が調整されたメーキャップ形状と、肌色度合いDsと、マスクとを合成し、色の合成に用いる重み分布を求める(S25)。具体的には、重み決定部24は、重み分布として、各ピクセルについて、大きさおよび形状が調整されたメーキャップ形状と、肌色度合いDsと、マスクとの積を求める。
 図11は、図9に対応する、肌色度合いDsとマスクとの積を示す画像である。図9と比べると、マスクによって、目の部分がマスクされているのが分かる。なお、メーキャップ色は、図11において明るく示されているピクセルについて、より濃く重ねられる。なお、重み決定部24は、肌色度合いDsとマスクとの積の値を、所定の閾値(例えば0.5)と比較することにより、各ピクセルが肌であるか否かを判定してもよい。そして、例えば、肌であると判定されたピクセルの値を1、肌ではないと判定されたピクセルの値を0として重みを2値化してもよい。または、積が所定の閾値より小さいピクセルのみ、重みを0としてもよい。
 図12は、図6に対応する、重み分布を示す画像である。重み分布は、調整されたメーキャップ形状と肌色度合いDsとマスクとの積であり、図12は、図6に示す重みと図11に示す重みとを各ピクセルについて積をとった重み分布を示す。図12において、明るい(白い)箇所は重みが大きい箇所を示し、暗い(黒い)箇所は重みが小さい箇所を示す。図12に示すものが最終的な重みであり、明るい(白い)箇所はメーキャップ色が濃く塗られる。以上で目のメーキャップ処理に使用する重み分布の算出処理が終了する。
 図13は、頬のメーキャップ処理に使用する重み分布を算出する処理の詳細な流れを示すフローチャートである。頬の場合は、目のマスク処理を必要としない点が異なるが、他は目の場合と同様の処理を行うので簡単に説明する。
 形状調整部21は、メーキャップ処理に使用するメーキャップの基本形状を決定する(S31)。例えば、頬紅の基本形状は、図5に示すように頬紅の塗布領域の中心付近の重みが最も大きく(頬紅の色が濃く)、中心から離れるにつれて徐々に重みが小さくなる(頬紅の色が薄くなる)重み分布を有する。
 形状調整部21は、使用するメーキャップ基本形状を、顔画像の頬の形状に適合するよう、検出された目、口、および鼻の特徴に応じて変形する(S32)。まず、形状調整部21は、検出された目、口、および鼻等の特徴の位置関係から、使用するメーキャップ基本形状の大きさを、顔画像の頬の大きさに適した大きさに変更する。また、形状調整部21は、目、口、および鼻等の特徴の位置関係から頬のいくつかの代表点の位置を推定する。該代表点と、大きさが調整されたメーキャップ基本形状の対応する点とがそれぞれ一致するように、形状調整部21は、大きさが調整されたメーキャップ基本形状を変形する。
 肌特定部22は、処理対象の顔画像の各ピクセルについて、肌色度合いDsを特定する(S33)。この処理は目のメーキャップ処理の場合と同じである。
 重み決定部24は、重み分布を表す各要素、すなわち、大きさおよび形状が調整されたメーキャップ形状と、肌色度合いDsとを合成し、色の合成に用いる重み分布を求める(S34)。具体的には、重み決定部24は、重み分布として、各ピクセルについて、大きさおよび形状が調整されたメーキャップ形状と、肌色度合いDsとの積を求める。以上で頬のメーキャップ処理に使用する重み分布の算出処理が終了する。
 図7のフローに戻り、S9またはS10の後、色補正部16は、利用者が指定したメーキャップ色を補正して、合成に用いるピクセル毎に補正されたメーキャップ色を求める(S11)。色補正部16は、瞼領域(または頬領域)の各ピクセルの色の差に基づく補正と、左右の瞼領域(または頬領域)の明るさ(輝度)の差に基づく補正とを行う。
 具体的には、まず、色補正部16は、メーキャップを施す領域の肌の色の代表色(Yo,Cbo,Cro)を取得する。肌の色の代表色は、該領域の平均色等であってもよい。また、顔領域全体の肌の色の平均色を代表色として用いてもよい。なお、ここでは色空間としてYCbCr色空間を用いるがこれに限らない。色補正部16は、利用者が指定したメーキャップ色(Ys,Cbs,Crs)と肌の色の代表色(Yo,Cbo,Cro)とから、θおよびrを求める。ここで、θは、CbCr平面においてベクトル(Cbs,Crs)とベクトル(Cbo,Cro)とがなす角である。また、r=Ys/Yoである。θは、メーキャップ色と肌の色の代表色との色味または色相の差と言える。また、rは、メーキャップ色と肌の色の代表色との輝度の比を示す。
 色補正部16は、顔画像の各ピクセル値(Y,Cb,Cr)に対し、該ピクセルに重ねる(合成する)メーキャップ色(Y’,Cb’,Cr’)をピクセル毎に求める。ここで、Y’=rYになるようにメーキャップ色の輝度Y’を決定する。また、CbCr平面においてベクトル(Cb’,Cr’)とベクトル(Cb,Cr)とがなす角がθになるように、Cb’およびCr’を決定する。言い換えれば、色補正部16は、利用者が指定したメーキャップ色と肌の色の代表色との輝度の比および色相の差を用いて、顔画像の肌の色(各ピクセル値)に応じて補正したメーキャップ色(Y’,Cb’,Cr’)を求める。なお、輝度の比(または差)および色相の差のいずれか一方のみを用いてメーキャップ色を補正してもよい。
 図14は、補正されたメーキャップ色(Y’,Cb’,Cr’)と顔画像の対応するピクセル値(Y,Cb,Cr)との色空間における関係を示す図である。図14に示すように、顔画像の各ピクセル値(Y,Cb,Cr)と、それに対応する補正されたメーキャップ色(Y’,Cb’,Cr’)との色空間における関係(θ、rの関係)が、肌の色の代表色(Yo,Cbo,Cro)と、利用者が指定したメーキャップ色(Ys,Cbs,Crs)との関係と同じになるように、色補正部16は、メーキャップ色を補正する。なお、ピクセル毎に補正せずに利用者に指定されたメーキャップ色をそのまま用いてもよい。
 次に、色補正部16は、顔の左側のメーキャップを施す領域(例えば左瞼)のピクセルの輝度の平均Ylと、顔の右側のメーキャップを施す領域(例えば右瞼)のピクセルの輝度の平均Yrとを取得する。そして、色補正部16は、左右のメーキャップ領域の輝度の差d=Yl-Yrを用いて、メーキャップ色(Y’,Cb’,Cr’)の輝度Y’をさらに補正し、左右の肌の明るさの差に基づいて補正されたメーキャップ色の輝度Yl’(左用)およびYr’(右用)を求める。
Yl’=Y’-γd
Yr’=Y’+γd
ここで、γ(0≦γ≦0.5)は左右のメーキャップの見え方の違いを調整するパラメータであり、メーキャップの種類毎にあらかじめ設定されていてもよいし、利用者が指定してもよい。なお、左右いずれかのメーキャップ色を基準にして、もう一方のメーキャップ色の輝度のみを補正してもよい。また、左右の平均輝度の比(Yl/Yr)を用いて、Yr’=Y’(Yl/Yr)のように補正してもよい。また、左右の平均輝度を用いる代わりに、左右のメーキャップ領域の輝度の中央値等、メーキャップ領域の明るさを代表する代表輝度(代表色)を用いてメーキャップ色を補正してもよい。
 撮像時の照明等の影響により、左右の瞼(または頬)領域の明るさ(輝度)が異なる場合、ピクセル毎に補正した後のメーキャップ色(Y’,Cb’,Cr’)をそのまま顔画像に合成すると、メーキャップ色が左右で異なって見えることがある。そのため、メーキャップ色の左右の輝度差が小さくなるようにメーキャップ色の輝度Y’を補正して、Yl’およびYr’を得る。
 合成部17は、重み分布を用いて、処理対象の顔画像の色に、補正されたメーキャップ色を合成する(重ねる)ことにより、顔画像にメーキャップ色を塗布(着色)する(S12)。具体的には、合成部17は、各ピクセルについて、該ピクセルの重みwに補正されたメーキャップ色をかけて、顔画像の該ピクセルの色と合成する。合成後の各ピクセルの色(Ya,Cba,Cra)は、例えば以下の式を用いて得られる。
Ya=(1-α×w)×Y+α×w×Yl’   (左瞼、左頬の場合)
Ya=(1-α×w)×Y+α×w×Yr’   (右瞼、右頬の場合)
Cba=(1-w)×Cb+w×Cb’
Cra=(1-w)×Cr+w×Cr’
ここで、wは各ピクセルについての重みであり、α(0<α≦1)は輝度について重みを調整するパラメータである。輝度の変化は視覚的な影響が大きく、メーキャップによって輝度が大きく変化すると不自然に見えるため、合成部17は、メーキャップによる輝度の変化を抑えて、顔画像にメーキャップ色を合成する。
 左右のメーキャップ処理が完了していなければ(S13でNo)、S7に戻り、左右の残りの処理を行う。
 左右のメーキャップ処理が完了している場合(S13でYes)、続いて他のメーキャップ処理(アイライン、頬紅等)を行う。
 他のメーキャップ処理が未処理の場合(S14でNo)、S6に戻り、未処理のメーキャップ処理を行う。
 指示された全てのメーキャップ処理が完了している場合(S14でYes)、表示制御部18は、メーキャップ処理後の画像を表示装置5に表示させ、メーキャップ処理を終了する。
 本実施の形態によれば、処理対象の顔画像の肌色度合いを判定し、肌色度合いに応じて肌であると考えられる箇所にメーキャップ処理を施す。肌色度合いが小さい箇所については、メーキャップ処理の重みを小さくする、またはメーキャップ処理を行わない。そのため、メーキャップすべき領域の一部が眼鏡または髪等の他の物体に覆われている場合でも、他の物体にメーキャップ処理を行うことを防止し、肌にのみメーキャップ処理を行い自然なメーキャップ処理画像を得ることができる。また、目等の特徴点の検出を誤った場合にも、肌色度合いに応じてメーキャップ処理を行うので、目の中や顔の範囲外にメーキャップ処理を行うことを防止することができる。そのため、利用者は最初にメーキャップの種類、形状、色等を選択するだけで、気軽にメーキャップシミュレーションを行うことができる。
 また、目の輪郭形状の個人差、顔画像の顔の向きが正面でないこと、または照明の当たり方で目の輪郭がはっきりしないこと等に起因し、検出した特徴点(目尻、目頭、目輪郭点等)の位置に誤差が生じることがある。このような場合、従来の技術では、目の中にアイラインまたはアイシャドウが入り込むことがある。
 本実施の形態では、形状調整部21がメーキャップ形状を調整する方法とは異なる方法で、マスク部23が目の領域を規定し、目の領域にマスクをする。そのため、メーキャップ形状が目に重なるように配置された場合でも、目の領域はマスクされるので、目にメーキャップが入り込むことを防止することができる。
 また、撮像時に左右の照明の当たり方が均一ではなく、顔画像の左右の一方に陰影ができていたりして、左右の肌の明るさが同じではないことがある。そのような顔画像にメーキャップを塗布する際に、左右で異なる肌の色に同じ色のメーキャップ色を合成すると肌の色の違いが反映されて、合成後のメーキャップの色は左右で異なっているように見えることがある。
 本実施の形態では、左右のメーキャップ領域の肌の色の違いに応じて左右のメーキャップ領域毎に適用するメーキャップ色を補正し、合成に使用するメーキャップ色を左右で異なる色にすることにより、肌にメーキャップが合成された後のメーキャップ領域の色の差異を減少させ、自然な見た目のメーキャップ処理を行うことができる。
 また、画像から検出した顔の向きが正面から大きく外れていたり、笑うなどの大きな表情変化があって特徴点をうまく検出できない場合、メーキャップ処理を施すと意図しない位置にメーキャップを合成してしまい、不自然になってしまう場合がある。また、顔画像が小さい場合、メーキャップを施す小さな領域にうまくグラデーションがかけられないので自然なメーキャップ処理が困難になることがある。
 本実施の形態では、検出した顔画像がメーキャップ処理に適しているかを判定し、適していると判定された顔画像についてメーキャップ処理を行う。そのため、メーキャップ処理による失敗を防止し、メーキャップに適した顔画像にだけメーキャップ処理を行うことができる。
 なお、本実施の形態では、画像処理装置を備えるデジタルカメラを例にとって説明したが、これに限らず、デジタルビデオカメラ、カメラ付き携帯電話、コンピュータ等に適用することもできる。撮像される画像は、Webカメラ、ネットワーク、着脱可能な記憶装置等を介して取得されてもよい。また、撮像された静止画だけではなく、動画等の顔画像にメーキャップ処理を行ってもよい。また、デジタルカメラで撮像を行う際にデジタルカメラの表示装置に表示されるプレビュー画像にメーキャップ処理を施してもよい。
 また、メーキャップに限らず、人物画像の顔または肌等に任意の模様を合成してもよい。本実施の形態では、合成後の左右のメーキャップ領域の色(輝度)の違いが小さくなるよう、適用するメーキャップ色を左右で異なる色に補正したが、左右に限らず、同じ色のメーキャップ色を適用する複数の異なるメーキャップ領域において、合成後の複数のメーキャップ領域の色(輝度)の違いが小さくなるよう、各メーキャップ領域の肌の色の差(例えば各メーキャップ領域の肌の平均色との差)を用いて、適用するメーキャップ色を各メーキャップ領域毎に補正してもよい。
 <課題を解決するための手段>
 本発明に係る画像処理装置は、人物画像の肌に、ある色の模様を着色する処理を行う画像処理装置であって、上記の課題を解決するために、上記人物画像の少なくとも一部の領域の箇所毎に、上記人物画像における色の肌色度合いを特定する肌特定部と、上記人物画像に、上記肌色度合いに応じた濃さで上記模様を着色する着色部とを備えることを特徴としている。
 本発明に係る画像処理方法は、人物画像の肌に、ある色の模様を着色する処理を行う画像処理方法であって、上記の課題を解決するために、上記人物画像の少なくとも一部の領域の箇所毎に、上記人物画像における色の肌色度合いを特定する肌特定ステップと、上記人物画像に、上記肌色度合いに応じた濃さで上記模様を着色する着色ステップとを含むことを特徴としている。
 上記の構成によれば、人物画像の少なくとも一部の領域の各箇所の肌色度合いを特定し、肌色度合いに応じた濃さで人物画像に模様を着色する。よって、肌であると考えられる箇所については模様を濃く着色し、肌ではないと考えられる箇所(例えば髪、眼鏡等)には薄く着色する、または着色しないようにすることができる。そのため、人物画像の肌に適切にメーキャップ等の模様を着色することができる。それゆえ、例えば利用者が、前髪を上げたり、眼鏡を外したり、照明を当てたりした画像を準備しなくとも、幅広い条件で撮られた画像を用いてメーキャップシミュレーションを行うことができる。
 また、上記画像処理装置は、上記人物画像の上記一部の領域の各箇所の上記肌色度合いを反映した重み分布を決定する重み分布決定部を備え、上記着色部は、上記重み分布の重みを用いて、上記人物画像の上記一部の領域の各箇所に上記模様の色を重ねることによって着色する構成であってもよい。
 上記の構成によれば、肌色度合いを反映した重みによって人物画像の元の色と模様の色とを合成する。そのため、肌であると考えられない箇所の重みを小さくすることにより、肌ではない箇所(例えば髪、眼鏡等)に模様の色を合成することを抑制することができる。
 また、上記画像処理装置は、上記人物画像の所定の部位の位置を検出する検出部と、検出された上記位置に基づき、上記所定の部位に着色することを抑制するマスクを生成するマスク部とを備え、上記重み分布決定部は、上記肌色度合いと上記マスクとを反映した重み分布を決定する構成であってもよい。
 上記の構成によれば、所定の部位にマスクを設定し、所定の部位を模様の色で着色することを防止することができる。よって、意図に反して人物画像の所定の部位に模様が入り込むことを防止することができる。
 また、上記画像処理装置は、上記人物画像の所定の部位の位置を検出する検出部と、検出された上記位置に基づき、上記人物画像の顔が、模様を着色する対象として適しているか否かを判定する適否判定部とを備え、上記人物画像の顔が、模様を着色する対象として適していると判定された場合に、上記着色部は、上記人物画像の顔に対して上記模様を着色する構成であってもよい。
 上記の構成によれば、人物画像の顔が、模様を着色する対象として適していると判定された場合に、模様を着色する処理を行うので、模様を着色する処理の失敗を防止することができる。
 また、上記適否判定部は、検出された上記位置に基づき、上記人物画像の顔の向きを特定し、上記人物画像の顔の向きが所定の範囲内にある場合、上記人物画像の顔が、模様を着色する対象として適していると判定してもよい。
 人物画像の顔の向きが、例えば正面ではなく横向きである場合、メーキャップ等の模様を当該顔に着色することが難しい。上記の構成によれば、人物画像の顔の向きが所定の範囲内にある場合、上記人物画像の顔が、模様を着色する対象として適していると判定するので、メーキャップ処理を行うことができる人物画像を適切に判定することができる。
 また、上記肌特定部は、上記人物画像の肌の色を代表する代表色と、上記人物画像の上記一部の領域の各箇所の色との間の色空間における距離に基づき、上記人物画像の上記一部の領域の各箇所について上記肌色度合いを特定してもよい。
 上記の構成によれば、肌の代表色との色空間における距離が近いか否か、すなわち、肌の代表色に近い色か否かによって、人物画像の上記一部の領域の各箇所の肌色度合いを特定することができる。よって、適切に肌であると考えられる箇所に模様を着色することができる。
 また、上記着色部は、上記人物画像の顔に、メーキャップとして上記模様を着色してもよい。
 上記の構成によれば、人物画像の顔の肌である箇所に、適切にメーキャップを施すことができる。
 本発明に係る画像処理装置は、人物画像の肌に、ある色の模様を着色する処理を行う画像処理装置であって、上記の課題を解決するために、上記人物画像の、肌である箇所を特定する肌特定部と、上記特定された肌である箇所に、上記模様を着色する着色部とを備えることを特徴としている。
 本発明に係る画像処理方法は、人物画像の肌に、ある色の模様を着色する処理を行う画像処理方法であって、上記の課題を解決するために、上記人物画像の、肌である箇所を特定する肌特定ステップと、上記特定された肌である箇所に、上記模様を着色する着色ステップとを含むことを特徴としている。
 上記の構成によれば、人物画像の肌である箇所を特定し、人物画像の肌である箇所にのみ模様を着色する。よって、そのため、人物画像の肌に適切にメーキャップ等の模様を着色することができる。
 なお、上記画像処理装置は、一部をコンピュータによって実現してもよく、この場合には、コンピュータを上記各部として動作させることにより上記画像処理装置をコンピュータにて実現させる制御プログラム、および上記制御プログラムを記録したコンピュータ読み取り可能な記録媒体も、本発明の範疇に入る。
 最後に、画像処理装置6の各ブロック、特に画像取得部11、顔検出部12、特徴検出部13、適否判定部14、メーキャップ形状決定部15、色補正部16、合成部17、表示制御部18、形状調整部21、肌特定部22、マスク部23、および重み分布決定部24は、ハードウェアロジックによって構成してもよいし、次のようにCPU(central processing unit)を用いてソフトウェアによって実現してもよい。
 すなわち、画像処理装置6は、各機能を実現する制御プログラムの命令を実行するCPU、上記プログラムを格納したROM(read only memory)、上記プログラムを展開するRAM(random access memory)、上記プログラムおよび各種データを格納するメモリ等の記憶装置(記録媒体)などを備えている。そして、本発明の目的は、上述した機能を実現するソフトウェアである画像処理装置6の制御プログラムのプログラムコード(実行形式プログラム、中間コードプログラム、ソースプログラム)をコンピュータで読み取り可能に記録した記録媒体を、上記画像処理装置6に供給し、そのコンピュータ(またはCPUやMPU(microprocessor unit))が記録媒体に記録されているプログラムコードを読み出し実行することによっても、達成可能である。
 上記記録媒体としては、例えば、磁気テープやカセットテープ等のテープ系、フロッピー(登録商標)ディスク/ハードディスク等の磁気ディスクやCD-ROM(compact disc read-only memory)/MO(magneto-optical)/MD(Mini Disc)/DVD(digital versatile disk)/CD-R(CD Recordable)等の光ディスクを含むディスク系、ICカード(メモリカードを含む)/光カード等のカード系、あるいはマスクROM/EPROM(erasable programmable read-only memory)/EEPROM(electrically erasable and programmable read-only memory)/フラッシュROM等の半導体メモリ系などを用いることができる。
 また、画像処理装置6を通信ネットワークと接続可能に構成し、上記プログラムコードを通信ネットワークを介して供給してもよい。この通信ネットワークとしては、特に限定されず、例えば、インターネット、イントラネット、エキストラネット、LAN(local area network)、ISDN(integrated services digital network)、VAN(value-added network)、CATV(community antenna television)通信網、仮想専用網(virtual private network)、電話回線網、移動体通信網、衛星通信網等が利用可能である。また、通信ネットワークを構成する伝送媒体としては、特に限定されず、例えば、IEEE(institute of electrical and electronic engineers)1394、USB、電力線搬送、ケーブルTV回線、電話線、ADSL(asynchronous digital subscriber loop)回線等の有線でも、IrDA(infrared data association)やリモコンのような赤外線、Bluetooth(登録商標)、802.11無線、HDR(high data rate)、携帯電話網、衛星回線、地上波デジタル網等の無線でも利用可能である。
 本発明は上述した実施形態に限定されるものではなく、請求項に示した範囲で種々の変更が可能である。すなわち、請求項に示した範囲で適宜変更した技術的手段を組み合わせて得られる実施形態についても本発明の技術的範囲に含まれる。
 本発明は、画像処理装置を備えるデジタルカメラ等に利用することができる。
 1  デジタルカメラ
 2  指示入力装置
 3  撮像装置
 4  画像記憶装置
 5  表示装置
 6  画像処理装置
11  画像取得部(指示受領部)
12  顔検出部
13  特徴検出部(検出部)
14  適否判定部
15  メーキャップ形状決定部
16  色補正部
17  合成部(着色部)
18  表示制御部
21  形状調整部
22  肌特定部
23  マスク部
24  重み分布決定部

Claims (12)

  1.  人物画像の肌に、ある色の模様を着色する処理を行う画像処理装置であって、
     上記人物画像の少なくとも一部の領域の箇所毎に、上記人物画像における色の肌色度合いを特定する肌特定部と、
     上記人物画像に、上記肌色度合いに応じた濃さで上記模様を着色する着色部とを備えることを特徴とする画像処理装置。
  2.  上記人物画像の上記一部の領域の各箇所の上記肌色度合いを反映した重み分布を決定する重み分布決定部を備え、
     上記着色部は、上記重み分布の重みを用いて、上記人物画像の上記一部の領域の各箇所の色に上記模様の色を重ねることによって着色することを特徴とする請求項1に記載の画像処理装置。
  3.  上記人物画像の所定の部位の位置を検出する検出部と、
     検出された上記位置に基づき、上記所定の部位に着色することを抑制するマスクを生成するマスク部とを備え、
     上記重み分布決定部は、上記肌色度合いと上記マスクとを反映した重み分布を決定することを特徴とする請求項2に記載の画像処理装置。
  4.  上記人物画像の所定の部位の位置を検出する検出部と、
     検出された上記位置に基づき、上記人物画像の顔が、模様を着色する対象として適しているか否かを判定する適否判定部とを備え、
     上記人物画像の顔が、模様を着色する対象として適していると判定された場合に、上記着色部は、上記人物画像の顔に対して上記模様を着色することを特徴とする請求項1または2に記載の画像処理装置。
  5.  上記適否判定部は、検出された上記位置に基づき、上記人物画像の顔の向きを特定し、上記人物画像の顔の向きが所定の範囲内にある場合、上記人物画像の顔が、模様を着色する対象として適していると判定することを特徴とする請求項4に記載の画像処理装置。
  6.  上記肌特定部は、上記人物画像の肌の色を代表する代表色と、上記人物画像の上記一部の領域の各箇所の色との間の色空間における距離に基づき、上記人物画像の上記一部の領域の各箇所について上記肌色度合いを特定することを特徴とする請求項1から5のいずれか一項に記載の画像処理装置。
  7.  上記着色部は、上記人物画像の顔に、メーキャップとして上記模様を着色することを特徴とする請求項1から6のいずれか一項に記載の画像処理装置。
  8.  人物画像の肌に、ある色の模様を着色する処理を行う画像処理装置であって、
     上記人物画像の、肌である箇所を特定する肌特定部と、
     上記特定された肌である箇所に、上記模様を着色する着色部とを備えることを特徴とする画像処理装置。
  9.  人物画像の肌に、ある色の模様を着色する処理を行う画像処理方法であって、
     上記人物画像の少なくとも一部の領域の箇所毎に、上記人物画像における色の肌色度合いを特定する肌特定ステップと、
     上記人物画像に、上記肌色度合いに応じた濃さで上記模様を着色する着色ステップとを含むことを特徴とする画像処理方法。
  10.  人物画像の肌に、ある色の模様を着色する処理を行う画像処理方法であって、
     上記人物画像の、肌である箇所を特定する肌特定ステップと、
     上記特定された肌である箇所に、上記模様を着色する着色ステップとを含むことを特徴とする画像処理方法。
  11.  人物画像の肌に、ある色の模様を着色する処理を行う画像処理装置の制御プログラムであって、
     上記人物画像の少なくとも一部の領域の箇所毎に、上記人物画像における色の肌色度合いを特定する肌特定ステップと、
     上記人物画像に、上記肌色度合いに応じた濃さで上記模様を着色する着色ステップとをコンピュータに実行させる制御プログラム。
  12.  人物画像の肌に、ある色の模様を着色する処理を行う画像処理装置の制御プログラムであって、
     上記人物画像の、肌である箇所を特定する肌特定ステップと、
     上記特定された肌である箇所に、上記模様を着色する着色ステップとをコンピュータに実行させる制御プログラム。
PCT/JP2011/056449 2010-10-29 2011-03-17 画像処理装置、画像処理方法、および制御プログラム WO2012056743A1 (ja)

Priority Applications (4)

Application Number Priority Date Filing Date Title
KR1020137009836A KR101614193B1 (ko) 2010-10-29 2011-03-17 화상 처리 장치, 화상 처리 방법, 및 제어 프로그램이 기록된 기록 매체
US13/878,109 US20130271485A1 (en) 2010-10-29 2011-03-17 Image-processing device, image-processing method, and control program
EP11835887.8A EP2615576B1 (en) 2010-10-29 2011-03-17 Image-processing device, image-processing method, and control program
CN201180050443.6A CN103180872B (zh) 2010-10-29 2011-03-17 图像处理装置及图像处理方法

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2010244186A JP4862955B1 (ja) 2010-10-29 2010-10-29 画像処理装置、画像処理方法、および制御プログラム
JP2010-244186 2010-10-29

Publications (1)

Publication Number Publication Date
WO2012056743A1 true WO2012056743A1 (ja) 2012-05-03

Family

ID=45604577

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2011/056449 WO2012056743A1 (ja) 2010-10-29 2011-03-17 画像処理装置、画像処理方法、および制御プログラム

Country Status (6)

Country Link
US (1) US20130271485A1 (ja)
EP (1) EP2615576B1 (ja)
JP (1) JP4862955B1 (ja)
KR (1) KR101614193B1 (ja)
CN (1) CN103180872B (ja)
WO (1) WO2012056743A1 (ja)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014167831A1 (ja) * 2013-04-08 2014-10-16 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカ メイクアップ塗材が塗布された状態を仮想的に再現することができる画像処理装置、画像処理方法、プログラム

Families Citing this family (30)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9082222B2 (en) * 2011-01-18 2015-07-14 Disney Enterprises, Inc. Physical face cloning
JP6288404B2 (ja) * 2013-02-28 2018-03-07 パナソニックIpマネジメント株式会社 メイクアップ支援装置、メイクアップ支援方法、およびメイクアップ支援プログラム
CN104822292B (zh) * 2013-08-30 2019-01-04 松下知识产权经营株式会社 化妆辅助装置、化妆辅助系统、化妆辅助方法以及化妆辅助程序
JP6288816B2 (ja) * 2013-09-20 2018-03-07 カシオ計算機株式会社 画像処理装置、画像処理方法及びプログラム
CN103971389B (zh) * 2014-04-28 2017-02-15 拓维信息系统股份有限公司 一种面向手机游戏的迷彩脸谱实现方法
JP6369246B2 (ja) 2014-09-08 2018-08-08 オムロン株式会社 似顔絵生成装置、似顔絵生成方法
JP6086112B2 (ja) * 2014-12-08 2017-03-01 株式会社メイクソフトウェア 画像処理装置、画像処理方法及びコンピュータプログラム
JP6458570B2 (ja) * 2015-03-12 2019-01-30 オムロン株式会社 画像処理装置および画像処理方法
JP6458569B2 (ja) * 2015-03-12 2019-01-30 オムロン株式会社 画像処理装置および画像処理方法
JP6583660B2 (ja) * 2015-03-26 2019-10-02 パナソニックIpマネジメント株式会社 画像合成装置及び画像合成方法
TWI537875B (zh) * 2015-04-08 2016-06-11 大同大學 影像合成方法與影像處理裝置
JP6573193B2 (ja) * 2015-07-03 2019-09-11 パナソニックIpマネジメント株式会社 判定装置、判定方法、および判定プログラム
CN105427238B (zh) * 2015-11-30 2018-09-04 维沃移动通信有限公司 一种图像处理方法及移动终端
CN106846240B (zh) * 2015-12-03 2021-05-07 斑马智行网络(香港)有限公司 一种调整融合素材的方法、装置和设备
US11741639B2 (en) 2016-03-02 2023-08-29 Holition Limited Locating and augmenting object features in images
GB2548087B (en) * 2016-03-02 2022-05-11 Holition Ltd Locating and augmenting object features in images
JP6314322B2 (ja) * 2016-06-20 2018-04-25 株式会社メイクソフトウェア 画像処理装置、画像処理方法及びコンピュータプログラム
US10607372B2 (en) * 2016-07-08 2020-03-31 Optim Corporation Cosmetic information providing system, cosmetic information providing apparatus, cosmetic information providing method, and program
CN109890245A (zh) 2016-10-24 2019-06-14 松下知识产权经营株式会社 图像处理装置、图像处理方法以及图像处理程序
JP6753276B2 (ja) * 2016-11-11 2020-09-09 ソニー株式会社 情報処理装置、および情報処理方法、並びにプログラム
JP6720882B2 (ja) * 2017-01-19 2020-07-08 カシオ計算機株式会社 画像処理装置、画像処理方法及びプログラム
TWI731923B (zh) * 2017-01-23 2021-07-01 香港商斑馬智行網絡(香港)有限公司 調整融合材料的方法、裝置和設備
JP2017201550A (ja) * 2017-06-23 2017-11-09 株式会社メイクソフトウェア 画像処理装置、画像処理方法及びコンピュータプログラム
JP2019070870A (ja) * 2017-10-05 2019-05-09 カシオ計算機株式会社 画像処理装置、画像処理方法及びプログラム
CN108399654B (zh) 2018-02-06 2021-10-22 北京市商汤科技开发有限公司 描边特效程序文件包的生成及描边特效生成方法与装置
CN108564526A (zh) * 2018-03-30 2018-09-21 北京金山安全软件有限公司 一种图像处理方法、装置、电子设备及介质
CN109102484B (zh) * 2018-08-03 2021-08-10 北京字节跳动网络技术有限公司 用于处理图像的方法和装置
JP6635170B2 (ja) * 2018-10-22 2020-01-22 辰巳電子工業株式会社 写真撮影遊戯装置、画像処理方法、及び画像処理プログラム
CN110827195B (zh) * 2019-10-31 2023-09-22 北京达佳互联信息技术有限公司 虚拟物品添加方法、装置、电子设备及存储介质
CN111583139B (zh) * 2020-04-27 2023-06-20 抖音视界有限公司 腮红调整方法、装置、电子设备及计算机可读介质

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000279228A (ja) 1999-03-29 2000-10-10 Shiseido Co Ltd 頬紅メーキャップシミュレーションシステム
JP2000285222A (ja) 1999-03-29 2000-10-13 Shiseido Co Ltd 目元メーキャップシミュレーションシステム
JP2004303193A (ja) * 2003-03-20 2004-10-28 Omron Corp 画像処理装置
JP2007257165A (ja) * 2006-03-22 2007-10-04 Kao Corp メイクアップシミュレーション方法
JP2008243059A (ja) * 2007-03-28 2008-10-09 Fujifilm Corp 画像処理装置及び画像処理方法
JP2008276405A (ja) * 2007-04-26 2008-11-13 Kao Corp 顔画像の合成方法及び合成装置
JP2010211308A (ja) * 2009-03-06 2010-09-24 Fujifilm Corp メイクアップアドバイス装置、メイクアップアドバイス方法及びプログラム

Family Cites Families (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6137903A (en) * 1997-06-03 2000-10-24 Linotype-Hell Ag Color transformation system based on target color image
JP2000209425A (ja) * 1998-11-09 2000-07-28 Canon Inc 画像処理装置及び方法並びに記憶媒体
EP1202209B1 (en) * 2000-04-21 2012-03-21 Shiseido Company Limited Makeup counseling apparatus
EP1314132B1 (en) * 2000-06-27 2010-02-17 Rami Orpaz Make-up and fashion accessory display method and system
US7079158B2 (en) * 2000-08-31 2006-07-18 Beautyriot.Com, Inc. Virtual makeover system and method
JP4849761B2 (ja) * 2002-09-02 2012-01-11 株式会社 資生堂 質感に基づく化粧方法及び質感イメージマップ
US7382378B2 (en) * 2003-10-30 2008-06-03 Sensable Technologies, Inc. Apparatus and methods for stenciling an image
US7773091B2 (en) * 2004-09-07 2010-08-10 L'oreal Method and device for generating a synthesized image of at least one fringe of lashes
US20070058858A1 (en) * 2005-09-09 2007-03-15 Michael Harville Method and system for recommending a product based upon skin color estimated from an image
EP1956548A4 (en) * 2005-12-01 2009-04-15 Shiseido Co Ltd FACIAL CLASSIFICATION PROCEDURE, FACE CLASSIFICATION DEVICE, CLASSIFICATION IMAGING, FACE CLASSIFICATION PROGRAM, RECORDING MEDIUM ON WHICH THE PROGRAM IS RECORDED
EP1970859B1 (en) * 2005-12-28 2014-03-05 Kao Corporation Detecting method and detecting system for positions of face parts
KR101363691B1 (ko) * 2006-01-17 2014-02-14 가부시키가이샤 시세이도 메이크업 시뮬레이션 시스템, 메이크업 시뮬레이션 장치,메이크업 시뮬레이션 방법 및 메이크업 시뮬레이션프로그램
JP4946672B2 (ja) * 2007-07-04 2012-06-06 オムロン株式会社 脇見検出装置および方法、並びに、プログラム
JP2009064423A (ja) * 2007-08-10 2009-03-26 Shiseido Co Ltd メイクアップシミュレーションシステム、メイクアップシミュレーション装置、メイクアップシミュレーション方法およびメイクアップシミュレーションプログラム
JP4962224B2 (ja) * 2007-08-31 2012-06-27 セイコーエプソン株式会社 画像処理装置、画像処理方法およびコンピュータプログラム
JP5432532B2 (ja) * 2008-01-22 2014-03-05 株式会社 資生堂 化粧方法、化粧シミュレーション装置、及び化粧シミュレーションプログラム
US20090231356A1 (en) * 2008-03-17 2009-09-17 Photometria, Inc. Graphical user interface for selection of options from option groups and methods relating to same
JP2009290660A (ja) * 2008-05-30 2009-12-10 Seiko Epson Corp 画像処理装置、画像処理方法、画像処理プログラムおよび印刷装置
US8369625B2 (en) * 2008-06-30 2013-02-05 Korea Institute Of Oriental Medicine Method for grouping 3D models to classify constitution
JP4748271B2 (ja) * 2009-01-28 2011-08-17 株式会社ニコン 電子カメラおよび画像処理プログラム
JP4760999B1 (ja) * 2010-10-29 2011-08-31 オムロン株式会社 画像処理装置、画像処理方法、および制御プログラム

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000279228A (ja) 1999-03-29 2000-10-10 Shiseido Co Ltd 頬紅メーキャップシミュレーションシステム
JP2000285222A (ja) 1999-03-29 2000-10-13 Shiseido Co Ltd 目元メーキャップシミュレーションシステム
JP2004303193A (ja) * 2003-03-20 2004-10-28 Omron Corp 画像処理装置
JP2007257165A (ja) * 2006-03-22 2007-10-04 Kao Corp メイクアップシミュレーション方法
JP2008243059A (ja) * 2007-03-28 2008-10-09 Fujifilm Corp 画像処理装置及び画像処理方法
JP2008276405A (ja) * 2007-04-26 2008-11-13 Kao Corp 顔画像の合成方法及び合成装置
JP2010211308A (ja) * 2009-03-06 2010-09-24 Fujifilm Corp メイクアップアドバイス装置、メイクアップアドバイス方法及びプログラム

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP2615576A4

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014167831A1 (ja) * 2013-04-08 2014-10-16 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカ メイクアップ塗材が塗布された状態を仮想的に再現することができる画像処理装置、画像処理方法、プログラム
CN104380339A (zh) * 2013-04-08 2015-02-25 松下电器(美国)知识产权公司 能够将涂敷了化妆涂料的状态虚拟地再现的图像处理装置、图像处理方法、程序
JPWO2014167831A1 (ja) * 2013-04-08 2017-02-16 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカPanasonic Intellectual Property Corporation of America メイクアップ塗材が塗布された状態を仮想的に再現することができる画像処理装置、画像処理方法、プログラム
US9603437B2 (en) 2013-04-08 2017-03-28 Panasonic Intellectual Property Corporation Of America Image processing device, image processing method, and program, capable of virtual reproduction of makeup application state
CN104380339B (zh) * 2013-04-08 2018-11-30 松下电器(美国)知识产权公司 图像处理装置、图像处理方法、以及介质

Also Published As

Publication number Publication date
CN103180872B (zh) 2016-08-10
EP2615576A4 (en) 2014-05-14
EP2615576B1 (en) 2019-11-13
KR20130101058A (ko) 2013-09-12
JP2012098808A (ja) 2012-05-24
US20130271485A1 (en) 2013-10-17
CN103180872A (zh) 2013-06-26
EP2615576A1 (en) 2013-07-17
JP4862955B1 (ja) 2012-01-25
KR101614193B1 (ko) 2016-04-20

Similar Documents

Publication Publication Date Title
JP4862955B1 (ja) 画像処理装置、画像処理方法、および制御プログラム
JP4760999B1 (ja) 画像処理装置、画像処理方法、および制御プログラム
CN108229278B (zh) 人脸图像处理方法、装置和电子设备
US9142054B2 (en) System and method for changing hair color in digital images
WO2022179215A1 (zh) 图像处理方法及装置、电子设备和存储介质
US9058765B1 (en) System and method for creating and sharing personalized virtual makeovers
KR101446975B1 (ko) 얼굴 검출 기능을 사용한 얼굴 및 피부의 자동 미화
EP2720190B1 (en) Image processing device, image processing method, and control program
TWI325567B (en) Method and system for enhancing portrait images that are processed in a batch mode
EP1372109A2 (en) Method and system for enhancing portrait images
US20100189357A1 (en) Method and device for the virtual simulation of a sequence of video images
EP2685419A1 (en) Image processing device, image processing method, and control program
JP2000151985A (ja) 画像処理方法及び記録媒体
CN114155569B (zh) 一种化妆进度检测方法、装置、设备及存储介质
JP2007299113A (ja) ヘアカラー・メイクアップシミュレーションシステム
CN113421197B (zh) 一种美颜图像的处理方法及其处理系统
JP2021132321A (ja) 撮影遊戯装置およびプログラム

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 11835887

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2011835887

Country of ref document: EP

ENP Entry into the national phase

Ref document number: 20137009836

Country of ref document: KR

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

WWE Wipo information: entry into national phase

Ref document number: 13878109

Country of ref document: US