WO2011138649A2 - Method of processing images for application of a colour - Google Patents

Method of processing images for application of a colour Download PDF

Info

Publication number
WO2011138649A2
WO2011138649A2 PCT/IB2011/000868 IB2011000868W WO2011138649A2 WO 2011138649 A2 WO2011138649 A2 WO 2011138649A2 IB 2011000868 W IB2011000868 W IB 2011000868W WO 2011138649 A2 WO2011138649 A2 WO 2011138649A2
Authority
WO
WIPO (PCT)
Prior art keywords
layer
color
image
simulating
layers
Prior art date
Application number
PCT/IB2011/000868
Other languages
French (fr)
Other versions
WO2011138649A3 (en
Inventor
Benoît CHAUSSAT
Jean-Marc Robin
Christophe Blanc
Original Assignee
Vesalis
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 Vesalis filed Critical Vesalis
Priority to EP11723627.3A priority Critical patent/EP2593924A2/en
Publication of WO2011138649A2 publication Critical patent/WO2011138649A2/en
Publication of WO2011138649A3 publication Critical patent/WO2011138649A3/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/60Editing figures and text; Combining figures or text
    • 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

Definitions

  • the invention relates to an image processing method for simulating a color application on one or more areas of an image of a face while maintaining the realism of the image.
  • the invention furthermore relates to a corresponding method for simulating a color application on a portion of a user's face.
  • the known methods When a grayscale image is colored, the known methods have the effect of adding a color layer to the base image. Typically, a choice is made for a uniform color, which is applied to a portion of the image, without any particular effect. For some applications, this type of neutral coloring is satisfactory. In other cases, the coloring has the effect of reducing or even eliminating the realism of an image.
  • This disadvantage is particularly restrictive in the field of image processing representing human faces, in particular to simulate the application of a colored product or tinted on a face, such as in the field of makeup. For example, to simulate a red application on the lips of an image, a color is added uniformly over the area concerned. The result is a bland mouth, without realism, without relief, etc.
  • the invention provides different technical means.
  • An object of the invention to provide a method for simulating a color application on one or more areas of an image of a face while maintaining the realism of the image.
  • Another object is to provide a method for simulating different applications of different colors or shades to make a selection, while providing an optimal resemblance with the object represented by the image, in particular the face.
  • Another object is to simulate on an image of a face different effects produced by products intended to create variations in brightness or texture or relief.
  • the invention provides an image processing method comprising the steps of: obtaining a target image to be processed; determining a textural layer (or transparency) representative of at least a portion of the textures of this image for an area to be colored; apply to the area to be colored of the target image the textural layer and a coloring layer.
  • the invention further provides a method of simulating a color application on a portion of an image of a user's face comprising the steps of:
  • a layer generation module at least one shadow layer and / or a brightness layer adapted to locate and quantify zones of light and / or shade by generation of spatial lighting variations
  • Such a method is used to generate a layer having the effect of acting on the intensity of the color provided for application, so as to obtain varying intensity levels depending on the position on the application area.
  • the color to be applied is treated as a layer, and not as a modification or a substitution performed directly on the image considered. It is thus easy to substitute layers, delete or add layers.
  • the color layer to be applied can be replaced by a layer of another color.
  • a layer representing a given texture, independent of the base image, can be added, for example to simulate an effect of sand, moisture, etc. Layer modifications or substitutions can be made for a portion or all of one or more layers.
  • the method allows to create layers with the ability to locate and quantify areas of light or shade. According to a preferred embodiment, a layer for the light, and a layer for the shadow are produced.
  • the layers are applied in an order in which there is a lower plane to the upper plane: a target image; the color layer; layers of shadows and / or brightness.
  • the preferential order of applying the layers allows layers of shadows and / or brightness to act effectively, creating a realistic effect on the resulting image.
  • the layers are generated from the histogram of the target image.
  • the inclusion of thresholds, or thresholding, makes it possible to obtain particularly realistic results.
  • the textural layer is a layer of brightness.
  • the textural layer is a layer of shadows.
  • the textural layer comprises a shadow layer and a brightness layer.
  • the method also provides a step of detecting a plurality of key points of the image to define the area to be colored.
  • an effect layer is also applied, having an effect or texture different from those obtained from the target image.
  • the effect layer is advantageously generated from an image other than the target image.
  • the layers of a target image having a histogram of N levels are likely to be obtained by a sum of the partial sums of the pixels of the cards of each of the stages, up to a level. threshold to establish a separation between the levels useful for the determination of a shadow layer, and the levels useful for the determination of a layer of light.
  • the threshold level of a histogram of a target image is advantageously set so as to separate the pixels into two substantially equal portions.
  • the shadow layer is preferably set from the lowest level to the threshold level.
  • the light layer is preferably set from the highest level to the threshold level.
  • the invention furthermore provides a device for simulating a color application on a portion of an image of a user's face comprising:
  • microprocessor a working memory and instructions for implementation
  • a layer generation module adapted for extracting from a target image to be processed, at least one shadow layer and / or a brightness layer adapted to locate and quantify zones of light; and / or shade by generating spatial variations of illumination;
  • a layer application module adapted for applying the layers obtained by the layer generation module, to a target image to be processed.
  • the layer generation module is also adapted to obtain, from a color data input, a color layer to be applied.
  • FIG 1a schematically shows the operating principle of the method according to the invention
  • FIG. 1b schematically shows an example of a device for simulating a color application according to the invention
  • FIG. 2 illustrates, from an example, the key steps of the method
  • FIGS. 3a and 3b show examples of histograms of images or image zones to be treated according to the method of the invention
  • FIGS. 4a and 4b show examples of distribution maps of the pixels as a function of the level considered
  • FIG. 5 illustrates the principle advantageously used for adding the level maps to obtain the shadow and / or light masks
  • FIGS. 6a to 6c show, for purposes of illustration, partial sums of levels, until a shadow layer is obtained
  • FIGS. 7a to 7c show, for purposes of illustration, partial sums of levels, until a layer of light is obtained
  • FIGS. 8a to 8f show examples of generation of effects of various types
  • FIG. 9 shows an example of generation of flake effect.
  • Figure 1b schematically illustrates an exemplary embodiment of a device for simulating a color application on a portion of an image of a user's face.
  • the device comprises a microprocessor, a working memory and implementation instructions, an access to image data to be processed, a layer generation module adapted for extraction from a target image to be processed. , at least one shadow layer and / or a brightness layer adapted to locate and quantify zones of light and / or shadow by generating spatial variations of lighting, a layer application module , adapted for applying the layers obtained by the layer generation module, to a target image to be processed.
  • the layer generation module is also adapted to obtain, from a color data input, a color layer to be applied.
  • the implementation of the various modules is advantageously carried out by means of implementation instructions, allowing the modules to carry out the operation or operations specifically provided for the module concerned.
  • the instructions may be in the form of one or more software or software modules implemented by one or more microprocessors.
  • the module (s) and / or the software (s) are advantageously provided in a computer program product comprising a recording medium or recording medium that can be used by a computer and comprising a programmed code readable by a computer integrated in said medium or medium, allowing an application software execution on a computer or other device comprising a microprocessor.
  • FIG. 1a is a theoretical schematic representation of the graphic manipulations to be performed to obtain the desired modified image.
  • layers advantageously include a layer of light, a slap of shadows, a layer of color.
  • the first two types of layers will be described in more detail in the following.
  • the color layer includes the color information provided for application on the target image, and their spatial distribution.
  • the target image is advantageously used in color version (when the original image received is in color) for the application of the layers.
  • FIG. 2 is a diagrammatic representation of an exemplary implementation of the method according to the invention, from a target image consisting of an image of a mouth on which a user wishes to carry out an application of color optimally, without mitigating the textures of the lips.
  • the target image is received and used to generate two layers.
  • a shadow layer is produced, and in step 30, a light layer is generated.
  • a color layer is obtained. This layer contains the colorimetric data that the user wishes to apply to the target image.
  • the layer 40 can be obtained in various ways, for example by a choice on a color menu, or on images serving as models, or automatically, for example according to a global choice made by the user. than a style or an atmosphere.
  • step 50 the shadow and light layers are added to each other with the color layer obtained in step 40.
  • the layers 1, 2 and 3 shown in FIG. 2 are preferably asked in order. According to various variants, multiplying factors for one or the other layer can be used, in order to adjust or adapt the influences of the various layers.
  • step 60 the image processed with the layers is obtained. If the target image to be processed is in color, it is first converted to grayscale. The grayscale version is preferably used to obtain layers. However, as mentioned above, the color version (if it exists) of the target image is preferably used for the layer matching step as shown in Figure 1. In the example illustrated in the figures, 256 levels are considered, in order to obtain a high precision.
  • the number of levels can be limited, but should be greater than three, and more preferably higher to ten. In uses where precision and realism are decisive factors, the number of levels is advantageously greater than 50 or 100.
  • Figures 3a and 3b show examples of histograms of target images. These histograms indicate the distribution of the pixels of the image according to their brightness.
  • the abscissa represents the 256 levels. In this figure, the level 0 corresponds to the total darkness (the black) and the level 255 corresponds to the maximum brightness (the white), with a progression of regular preference between the two limits.
  • the ordinate represents the number of pixels assigned to each level.
  • the set of pixels represents the surface of the image.
  • a histogram corresponding to this portion is advantageously used.
  • Figures 4a and 4b show examples of pixel maps, for level 30 in Figure 4a and for level 120 in Figure 4b, based on the target image shown in Figure 1.
  • the cards allow to establish a distribution of pixels according to the level.
  • the histogram used is that commonly referred to as "RGB", representing all the values of the RGB range, namely red (R), green (V) and blue (B).
  • RGB red
  • V green
  • B blue
  • the luminosity histogram is used.
  • the histogram is split into two sections, separated by a threshold of demarcation.
  • This threshold can be positioned in various places, depending on the cases and characteristics sought. It is advantageously located at the median M of the histogram, so as to distribute substantially 50% of the pixels on each side.
  • levels are taken into account to generate a shadow layer.
  • the levels are taken into account to generate a layer of light.
  • Arrow 21 indicates the direction in which levels are taken from level 0 to level 120 in this example.
  • Arrow 31 indicates the direction in which levels are taken from level 255 to level 120 in this example. If a user wants to increase the light level, the threshold can be shifted to the left in this example.
  • the Median level (M) is preferably not taken into account for the shadow and light layers. This makes it possible to ensure that a level corresponding to a threshold is not influenced by the shadow or the light.
  • FIG. 5 schematically explains how the maps of different levels are preferentially added together to generate the shadow and / or light layer.
  • the level 1 map is used once.
  • the level 1 map is added twice, and the level 2 map once.
  • the level 1 map is added three times, the level 2 map twice, and the level 3 map once, and so on.
  • the following rule is derived from:
  • EC N1 (Map N1) + (N-1) (Map N2) + (N-2) (Map N3) + (N-3) (Map N4) + ... + 1Nseuil (Map Nseuil) where EC is the set of cards cumulated up to level N, N is the number of the current level.
  • FIGS. 6a to 6c present, using an image of a face, the intermediate steps before reaching the total sum between the levels 0 and 120.
  • the result of Partial additions for example for level 0, the sum for levels 0 to 10, the sum for levels 0 to 20, etc., up to the sum for levels 0 to 120, shown in Figure 6c.
  • the shadow layer is then obtained ( Figure 6c), with the shaded areas in black and the pale areas in white.
  • FIGS. 7a to 7c show a similar example, for the addition of the levels 255 to 120.
  • the level 255 alone, then the sum of the levels 255 to 250, then the sum of the levels 255 to 240, then the sum of the levels 255 to 230, then the sum of the levels 255 to 220, etc., until the sum of the levels 255 to 120.
  • the layer of the lights last image of the figure 7c
  • This mode of presentation of the layer with the black signifying the presence of information of light, evokes an "inverted" image. In practice, it is not useful to generate all these intermediate steps.
  • This layer of transparency is characterized by a high opacity where the light is maximum and a transparency which increases more the light decreases.
  • a color applied under this layer has a rendering that takes into account the variations of illuminations. The color is rendered the same where the transparency is strong and undergoes modifications of blur and illumination without being distorted.
  • the shadow layer corresponds to the sum of the partial sums (for each stage) between the level 0 and the level 120.
  • the layer of the lights corresponds to the sum of the partial sums (for each floor) between level 255 and level 120.
  • the method is modified by selecting only a fraction of the levels to be stacked instead of stacking the 256 levels. For example, the levels containing only a certain percentage of sufficiently bright pixels can be retained. This makes it possible to create localized effects or to play on the rendering. By decomposing the image and extracting the illumination components, there is thus a way to apply a color in a manner fully adapted to the image.
  • the presented process allows to create a transparent layer that represents the shadows with their different levels of opacity. It is the same for the lights.
  • the shadow layer includes all levels from level 0 to Median level -1, in the case where the threshold corresponds to the median.
  • level 1 is determined as the most shaded level possible, that is to say black (# 000000) and the median level -1 as the less shady.
  • the pixels in the shadow layer are absolute black (# 000000) and have different opacity for each level, represented by an opacity value (Alpha) "Op".
  • opacity value Alpha
  • NR is the level for which you want to know the opacity.
  • NC is the number of the card for which opacity is desired.
  • the opacity is calculated as follows:
  • Op 1 - (NR - NC) x 100 / Number of Levels.
  • the pixels of the layer of lights are white on a transparent background (Alpha).
  • various types of effects may be applied to the image to be processed. These effects vary the color shades to apply.
  • several effects imitating those of certain types of makeup may be provided, in order to widen the possibilities of simulation.
  • a user can virtually test an almost infinite number of possibilities without having to undergo the constraints of make-up and makeup remover. It can also keep in memory the various simulations performed, for future reference.
  • the effects are presented under different layers representing areas of shadow and light. They are advantageously obtained in a manner similar to the previously described shadow and light layers. In this way, an implementation is obtained which allows a transposition on the target image without loss of realism.
  • the effect layers can themselves undergo treatments and / or adjustments such as opacity, linear or non-linear blur, coloring, etc. They can also be accumulated, preferably by respecting a certain order.
  • the matt effect consists of removing from the gloss of the area to be treated, for example the mouth zbiC, as shown in Figure 8a. The goal is to mitigate these brilliances by replacing them with color.
  • an area covering for example 60% of the pixels considered as the gloss set is determined.
  • a value other than 60% may be used.
  • An es60BC layer represents the addition of the set of levels from 255 to 0 with an identical alpha value for each level.
  • the demarcation threshold for this example is 60%
  • the levels taken into account range from about 255 to about 102, so as to obtain about 60% of light.
  • the level addition mode is similar to that previously described for a threshold positioned at the median level (FIG. 2 and FIG. 5).
  • This layer provides a gray level image zbiCM of the matte mouth.
  • This image serves as a new base for determining a light layer, as previously described.
  • the median of the histogram of the zbiCM image is preferably used.
  • To reconstruct the image of the mouth with a matte rendering then simply superimpose the esMN layers created from the original image zbiC and esMB created from the image zbiCM whose glosses were removed on the zC layer of the desired color.
  • the layers 1, 2 and 3 shown in FIG. 8a are arranged in a manner similar to that presented in step 50 of FIG. 2.
  • An es60BA layer obtained in a similar manner to the es60BC layer described for Figure 8a, is obtained from the target image.
  • a Gaussian (or other) type of blur we obtain the es60BA + EF layer. This layer makes it possible to soften the areas of brightness. It is advantageously applied with an opacity of the order of 50%.
  • the final satin rendering zbiCCS is obtained by superimposing the esMNA shadow and esMBA light layers created from the original zbiC image whose purpose is to transpose the texture of the lips, with the es60BA + EF layer which allows amplification light. These layers are placed on the layer zC, the layer of the desired color.
  • the layers 1, 2, 3 and 4 shown in FIG. 8b are arranged in a manner similar to that presented in step 50 of FIG. 2.
  • the brilliant effect shown in Figure 8c, is to amplify the most intense light already existing in a defined area.
  • a threshold covering for example 5% of the pixels is determined.
  • a value other than 5% can be used, depending on the desired effects.
  • the es5BA layer represents the addition of the set of levels from 255 to 0 with no Alpha value (opacity of 100%) until the threshold of 5% is reached. To avoid too much contrast, a slight blur or anti-aliasing can be applied on this layer.
  • the final glossy rendering zbiCCB is obtained by superimposing the esMNA shadow and esMBA light layers created from the original zbiC image to the es5BA layer that allows the amplification of light, all on the zC layer of the desired color.
  • the layers 1, 2, 3 and 4 shown in FIG. 8c are arranged in a similar manner to that presented in step 50 of FIG. 2.
  • the pearlescent effect, shown in FIG. 8d consists of amplifying the light on a large area in a delimited area and also to enhance the contrast of the texture. From the zone of the target image to be processed zbiC, a threshold covering for example 70% of the pixels is determined. Another value than 70% can be used, depending on the desired effects.
  • the es70BA is the sum of the set of levels from 255 to 0 with the same Alpha value for each level.
  • the threshold of demarcation being for this example at 70%, the levels taken into account range from 255 to about 76, so as to obtain about 70% of light.
  • the level addition mode is similar to that previously described for a threshold positioned at the median level (FIG. 2 and FIG. 5).
  • es50BAC layer is created from a second image zbiC + E3, whose contrast has been amplified on strategic areas.
  • the final nacreous rendering zbiCCN is obtained by superimposing the esMNA shadow and esMBA light layers created from the original zbiC image whose purpose is to transpose the original texture, with the layer es70BA whose opacity is low, with the layer es50BAC which allows to accentuate the relief by the light.
  • These layers are superimposed on the zC layer of the desired color. Layers 1, 2, 3, 4 and 5 shown in Fig. 8d are arranged similarly to that shown in step 50 of Fig. 2.
  • zbiC is the area of the image from which we obtain the image zbiC + E3 whose contrast has been amplified on strategic areas.
  • the final zbiCCC creamy rendering is obtained by overlaying the esMNA shadow and esMBA light layers created from the original zbiC image to the es50BA and es50NA layers that enhance the relief.
  • Each group is preferably applied with a certain percentage of opacity so that only the contrast is changed without amplifying the shadows and lights. These layers are superimposed on the zC layer of the desired color.
  • Layers 1, 2, 3, 4 and 5 shown in the figure 8e are arranged similarly to that presented in step 50 of Figure 2.
  • the gloss effect, shown in Figure 8f, is to amplify the light on a defined area giving a gelatin effect on the texture.
  • an es15BA module covering approximately 15% of the pixels and another es5BA module covering approximately 5% of the pixels are generated, both being the sum of the set of the included levels of 255 to 0 with an identical Alpha value for each level.
  • the level addition mode is similar to that previously described for a threshold positioned at the median level (FIG. 2 and FIG. 5). On these two modules, a filter is applied, es15BA + E1 and es5BA + E1.
  • the final gloss rendering zbiCGT is obtained by superimposing the two layers es15BA + E1 and es5BA + E1 on the original image zbiC for a translucent gloss.
  • This is the variant presented on the right of Figure 8f, with dotted line.
  • the same process is used with a coloring in addition to the layer representing the levels going from the median M to 255, producing the layer esMBAC + E1.
  • the results are directly applied to the zbiC origin area.
  • the layers 1 and 2, or 1, 2 and 3 (as the case may be) shown in FIG. 8f are arranged in a manner similar to that presented in step 50 of FIG. 2.
  • the addition of textures or patterns is provided by combining layers of external origin with the layers of the initial image.
  • FIG. 9 shows the integration of a layer of flakes.
  • the flakes generally represent points of metallic material that reflect the light.
  • a zpA layer represents them in white (a layer that can be colored in the case of gold or other colored glitter) is created on a transparent background. The flakes will reflect according to the level of light reaching them.
  • the flakes that are exposed to light are therefore considered opaque, and those in the shadow are transparent.
  • the es255NA + esMNA layer of black levels is used to mitigate glitches in shadows.
  • This layer consists of the sum of the levels from 0 to 255 (black threshold) to which the sum of the levels from 0 to the median is added twice, in order to cumulate the effects of thresholds.
  • This layer acts as a mask depending on its opacity. The thinner the opaque threshold, the more the flake has a low opacity. We obtain a layer zpAs which is the additional module to give the effect of flakes.
  • the final rendering zbiCC + zpAs is obtained by superimposing esMBA, esMNA and zpAs on the zC layer of the desired color.
  • the layers 1, 2 and 3 shown in FIG. 9 are arranged in a manner similar to that presented in step 50 of FIG. 2.
  • the complementary modules can be combined with other complementary modules or effect modules.
  • BA set threshold percentage of pixels between 255 to 0 of the histogram of the image
  • White Alpha white color
  • BAC set threshold percentage of pixels between 255 and 0 of the histogram of the image
  • Colorized Alpha White of desired color

Abstract

Method of simulating an application of colour to a portion of an image of a face of a user comprising the steps consisting in: - obtaining a photographic image of the user comprising at least one area of application of colour, designed for simulating coloration; - at least for the area of application of colour, extracting with the aid of a module for generating layers, at least one shadow layer and/or one brightness layer suitable for locating and quantifying areas of light and/or of shadow by generating spatial variations of lighting; - at least for the area of application of colour, extracting with the aid of a module for generating layers, at least one colour layer to be applied; - applying, with the aid of a module for applying layers, the layers to the target image.

Description

PROCEDE DE TRAITEMENT D'IMAGES POUR APPLICATION D'UNE COULEUR  IMAGE PROCESSING METHOD FOR APPLICATION OF COLOR
DOMAINE TECHNIQUE DE L'INVENTION TECHNICAL FIELD OF THE INVENTION
[0001] L'invention concerne un procédé de traitement d'images permettant de simuler une application de couleur sur une ou plusieurs zones d'une image d'un visage tout en conservant le réalisme de l'image. L'invention concerne par ailleurs un procédé correspondant de simulation d'une application de couleur sur une portion d'un visage d'un utilisateur. The invention relates to an image processing method for simulating a color application on one or more areas of an image of a face while maintaining the realism of the image. The invention furthermore relates to a corresponding method for simulating a color application on a portion of a user's face.
ETAT DE LA TECHNIQUE ANTERIEURE STATE OF THE PRIOR ART
[0002] Lorsqu'une image en niveaux de gris est colorée, les procédés connus ont pour effet qu'une couche de couleur s'ajoute à l'image de base. Typiquement, un choix est effectué pour une couleur uniforme, qui vient s'appliquer sur une portion d'image, sans effet particulier. Pour certaines applications, ce type de coloriage neutre est satisfaisant. Dans d'autres cas, le coloriage a pour effet d'atténuer, voire de faire disparaître le réalisme d'une image. Cet inconvénient est particulièrement contraignant dans le domaine du traitement d'images représentant des visages humains, en particulier pour simuler l'application d'un produit coloré ou teinté sur un visage, comme par exemple dans le domaine du maquillage. Par exemple, pour simuler une application de rouge sur les lèvres d'une image, on ajoute une couleur de façon uniforme sur la zone concernée. Il en résulte une bouche fade, sans réalisme, sans relief, etc. Dans une application de maquillage virtuel, une telle image est peu ou pas utilisable comme modèle pour une utilisatrice qui voudrait simuler différentes applications de couleur, car le résultat sur l'image n'est pas comparable avec le résultat d'une application de la même couleur directement sur la zone concernée (les lèvres pour l'exemple précédent). When a grayscale image is colored, the known methods have the effect of adding a color layer to the base image. Typically, a choice is made for a uniform color, which is applied to a portion of the image, without any particular effect. For some applications, this type of neutral coloring is satisfactory. In other cases, the coloring has the effect of reducing or even eliminating the realism of an image. This disadvantage is particularly restrictive in the field of image processing representing human faces, in particular to simulate the application of a colored product or tinted on a face, such as in the field of makeup. For example, to simulate a red application on the lips of an image, a color is added uniformly over the area concerned. The result is a bland mouth, without realism, without relief, etc. In a virtual makeup application, such an image is little or not usable as a model for a user who would like to simulate different color applications, because the result on the image is not comparable with the result of an application of the same color directly on the area concerned (the lips for the previous example).
[0003] On connaît aujourd'hui plusieurs procédés simulant des productions de masques, par exemple dans le domaine du maquillage. Une utilisatrice fourni une image du visage à maquiller, et obtient en retour une image modifiée, sur laquelle apparaît un masque de couleur. Ce masque sert à l'utilisatrice qui peut s'en servir comme modèle afin d'obtenir un maquillage. Puisqu'il est appliqué sur une image du visage de l'utilisatrice et non pas sur une image d'un modèle ayant des traits différents, le masque donne un effet réaliste qui constitue un excellent modèle pour l'application d'un maquillage par l'utilisatrice ou par un maquilleur. Il est donc important que cet effet réaliste soit conservé lors de l'application de la couleur sur l'image. Or, classiquement, les procédés de coloration connus ont pour effet de masquer les détails fins d'un visage comme par exemple les textures de lèvres. EXPOSE DE L'INVENTION [0003] Several processes are known today simulating mask productions, for example in the field of make-up. A user provides an image of the face to make up, and gets in return a modified image, on which appears a color mask. This mask is for the user who can use it as a model to obtain makeup. Since it is applied to an image of the user's face and not to an image of a model with different features, the mask gives a realistic effect which is an excellent model for the application of makeup by the user. user or by a makeup artist. It is therefore important that this realistic effect is preserved when color is applied to the image. However, conventionally, known coloring processes have the effect of masking the fine details of a face such as lip textures. SUMMARY OF THE INVENTION
[0004] Pour éviter que les étapes de coloration d'images à traiter, en particulier dans le domaine de la simulation d'applications de couleur sur des images de visages humains, donnent des résultats peu réalistes, fades et sans relief, l'invention prévoit différents moyens techniques.  To prevent the image staining steps to be treated, particularly in the field of the simulation of color applications on human face images, give unrealistic results, fades and without relief, the invention provides different technical means.
[0005] Un objet de l'invention consiste à prévoir un procédé permettant de simuler une application de couleur sur une ou plusieurs zones d'une image d'un visage tout en conservant le réalisme de l'image.  An object of the invention to provide a method for simulating a color application on one or more areas of an image of a face while maintaining the realism of the image.
[0006] Un autre objet consiste à prévoir un procédé permettant de simuler différentes applications de différentes couleurs ou nuances afin de procéder à une sélection, tout en procurant une ressemblance optimale avec l'objet représenté par l'image, en particulier le visage.  Another object is to provide a method for simulating different applications of different colors or shades to make a selection, while providing an optimal resemblance with the object represented by the image, in particular the face.
[0007] Enfin, un autre objet consiste à simuler sur une image d'un visage différents effets produits par des produits destinés à créer des variations de luminosité ou de texture ou de relief. Ces objectifs, ainsi que d'autres encore, sont atteints grâce au procédé défini dans les revendications.  Finally, another object is to simulate on an image of a face different effects produced by products intended to create variations in brightness or texture or relief. These and other objects are achieved by the method defined in the claims.
[0008] En outre, l'invention prévoit un procédé de traitement d'image comportant les étapes consistant à : obtenir une image cible à traiter ; déterminer un calque textural (ou de transparence) représentatif d'au moins une partie des textures de cette image pour une zone à colorer ; appliquer à la zone à colorer de l'image cible le calque textural et un calque de coloration.  In addition, the invention provides an image processing method comprising the steps of: obtaining a target image to be processed; determining a textural layer (or transparency) representative of at least a portion of the textures of this image for an area to be colored; apply to the area to be colored of the target image the textural layer and a coloring layer.
[0009] L'invention prévoit par ailleurs un procédé de simulation d'une application de couleur sur une portion d'une image d'un visage d'un utilisateur comprenant les étapes consistant à : The invention further provides a method of simulating a color application on a portion of an image of a user's face comprising the steps of:
-obtenir une image photographique de l'utilisateur comportant au moins une zone d'application de couleur prévue pour simulation de coloration ; obtaining a photographic image of the user comprising at least one color application zone intended for color simulation;
-au moins pour la zone d'application de couleur, extraire à l'aide d'un module de génération de calques, au moins un calque d'ombre et/ou un calque de luminosité adapté pour localiser et quantifier des zones de lumière et/ou d'ombre par génération de variations spatiales d'éclairage ;  at least for the color application area, extract using a layer generation module, at least one shadow layer and / or a brightness layer adapted to locate and quantify zones of light and / or shade by generation of spatial lighting variations;
-au moins pour la zone d'application de couleur, obtenir à l'aide d'un module de génération de calques, au moins un calque de couleur à appliquer ;  at least for the color application zone, using a layer generation module to obtain at least one color layer to be applied;
-appliquer, à l'aide d'un module d'application de calques, les calques à l'image cible.  -apply, using a layer application module, the layers to the target image.
[0010] Un tel procédé permet de générer un calque ayant pour effet d'agir sur l'intensité de la couleur prévue pour application, de façon à obtenir des niveaux d'intensité variant en fonction de la position sur la zone d'application. Par ailleurs, la couleur à appliquer est traitée comme un calque, et non pas comme une modification ou une substitution effectuée directement sur l'image considérée. On peut ainsi aisément substituer des calques, en supprimer ou en ajouter. Par exemple, le calque de couleur à appliquer peut être remplacé par un calque d'une autre couleur. Un calque représentant une texture donnée, indépendante de l'image de base, peut être ajouté, par exemple pour simuler un effet de sable, d'humidité, etc. Les modifications ou substitutions de calques peuvent être réalisées pour une portion ou la totalité d'un ou plusieurs calques. Such a method is used to generate a layer having the effect of acting on the intensity of the color provided for application, so as to obtain varying intensity levels depending on the position on the application area. In addition, the color to be applied is treated as a layer, and not as a modification or a substitution performed directly on the image considered. It is thus easy to substitute layers, delete or add layers. For example, the color layer to be applied can be replaced by a layer of another color. A layer representing a given texture, independent of the base image, can be added, for example to simulate an effect of sand, moisture, etc. Layer modifications or substitutions can be made for a portion or all of one or more layers.
[0011] C'est donc un ou plusieurs calques de variation d'ombre et/ou de variation de luminosité qui permettent de modifier le niveau d'éclairage. La génération de variations spatiales d'éclairage (lumière), permet de révéler le relief d'une image. Ainsi, dans une image, pour modifier une couleur tout en conservant le rendu des textures, on en extrait au moins un calque d'ombre et/ou de luminosité, qui sera par la suite appliqué à la couleur ou aux couleurs prévue pour application. Cela permet de manipuler efficacement la couleur, la lumière et les ombres, et donc les textures. Cela permet également de modifier le rendu d'une couleur (luminosité, flou, texture) sans en modifier la valeur fondamentale. On peut ainsi jouer sur la lumière et créer de nouveaux effets sans dénaturer les couleurs ni les textures. Ce procédé, qui consiste à créer des calques de "textures d'éclairement", présente aussi l'avantage de pouvoir exporter les effets créés pour utilisation sur d'autres images. It is therefore one or more layers of shadow variation and / or brightness variation that can change the lighting level. The generation of spatial variations of lighting (light) makes it possible to reveal the relief of an image. Thus, in an image, to modify a color while maintaining the rendering of the textures, at least one layer of shadow and / or brightness is extracted from it, which will then be applied to the color or colors intended for application. This effectively manipulates color, light and shadows, and therefore textures. It also makes it possible to modify the rendering of a color (brightness, blur, texture) without modifying the fundamental value. We can play on the light and create new effects without distorting colors or textures. This process, which consists of creating layers of "illumination textures", also has the advantage of being able to export the effects created for use on other images.
[0012] Le procédé permet de créer des calques offrant la possibilité de localiser et de quantifier les zones de lumière ou d'ombre. Selon un mode de réalisation préférentiel, un calque pour la lumière, et un calque pour l'ombre sont produits. The method allows to create layers with the ability to locate and quantify areas of light or shade. According to a preferred embodiment, a layer for the light, and a layer for the shadow are produced.
[0013] De manière avantageuse, les calques sont appliqués selon un ordre dans lequel on retrouve du plan inférieur au plan supérieur : une image cible ; le calque de couleur ; les calques d'ombres et/ou de luminosité.  Advantageously, the layers are applied in an order in which there is a lower plane to the upper plane: a target image; the color layer; layers of shadows and / or brightness.
[0014] L'ordre préférentiel d'application des calques permet aux calques d'ombres et/ou de luminosité d'agir de façon efficace, en créant un effet de réalisme sur l'image résultante.  The preferential order of applying the layers allows layers of shadows and / or brightness to act effectively, creating a realistic effect on the resulting image.
[0015] De manière avantageuse, les calques sont générés à partir de l'histogramme de l'image cible. La prise en compte de seuils, ou seuillage, permet l'obtention de résultats particulièrement réalistes. Selon un mode de réalisation avantageux, le calque textural est un calque de luminosité. Selon un autre exemple de réalisation avantageux, le calque textural est un calque d'ombres. De manière avantageuse, le calque textural comprend un calque d'ombre et un calque de luminosité. [0015] Advantageously, the layers are generated from the histogram of the target image. The inclusion of thresholds, or thresholding, makes it possible to obtain particularly realistic results. According to an advantageous embodiment, the textural layer is a layer of brightness. According to another advantageous embodiment, the textural layer is a layer of shadows. Advantageously, the textural layer comprises a shadow layer and a brightness layer.
[0016] De manière avantageuse, le procédé prévoit également une étape de détection d'une pluralité de points clés de l'image afin de délimiter la zone à colorer. [0017] Selon encore un autre exemple, on applique également un calque d'effet, comportant un effet ou texture différent de ceux obtenus à partir de l'image cible. Le calque d'effet est avantageusement généré à partir d'une image autre que l'image cible. Advantageously, the method also provides a step of detecting a plurality of key points of the image to define the area to be colored. In yet another example, an effect layer is also applied, having an effect or texture different from those obtained from the target image. The effect layer is advantageously generated from an image other than the target image.
[0018] Selon un mode de réalisation avantageux, les calques d'une image cible comportant un histogramme de N niveaux, sont susceptibles d'être obtenus par une somme des sommes partielles des pixels des cartes de chacun des étages, jusqu'à un niveau seuil permettant d'établir une séparation entre les niveaux utiles pour la détermination d'un calque d'ombre, et les niveaux utiles pour la détermination d'un calque de lumière.  According to an advantageous embodiment, the layers of a target image having a histogram of N levels, are likely to be obtained by a sum of the partial sums of the pixels of the cards of each of the stages, up to a level. threshold to establish a separation between the levels useful for the determination of a shadow layer, and the levels useful for the determination of a layer of light.
[0019] Le niveau de seuil d'un histogramme d'une image cible est avantageusement établi de façon à séparer les pixels en deux portions sensiblement égales. Le calque d'ombre est de préférence établi en partant du niveau le plus faible en se dirigeant vers le niveau de seuil. Le calque de lumière est de préférence établi en partant du niveau le plus élevé en se dirigeant vers le niveau de seuil.  The threshold level of a histogram of a target image is advantageously set so as to separate the pixels into two substantially equal portions. The shadow layer is preferably set from the lowest level to the threshold level. The light layer is preferably set from the highest level to the threshold level.
[0020] L'invention prévoit par ailleurs un dispositif de simulation d'une application de couleur sur une portion d'une image d'un visage d'un utilisateur comprenant : The invention furthermore provides a device for simulating a color application on a portion of an image of a user's face comprising:
-un microprocesseur, une mémoire de travail et des instructions de mise en œuvre ;  a microprocessor, a working memory and instructions for implementation;
-un accès à des données d'images à traiter ;  access to image data to be processed;
-un module de génération de calques, adapté pour l'extraction à partir d'une image cible à traiter, d'au moins un calque d'ombre et/ou d'un calque de luminosité adapté pour localiser et quantifier des zones de lumière et/ou d'ombre par génération de variations spatiales d'éclairage ;  a layer generation module, adapted for extracting from a target image to be processed, at least one shadow layer and / or a brightness layer adapted to locate and quantify zones of light; and / or shade by generating spatial variations of illumination;
-un module d'application de calques, adapté pour l'application des calques obtenus par le module de génération de calques, à une l'image cible à traiter.  a layer application module, adapted for applying the layers obtained by the layer generation module, to a target image to be processed.
[0021] Dans un exemple de réalisation avantageux, le module de génération de calque est également adapté pour l'obtention, à partir d'une entrée de données de couleur, d'un calque de couleur à appliquer. In an advantageous embodiment, the layer generation module is also adapted to obtain, from a color data input, a color layer to be applied.
DESCRIPTION DES FIGURES DESCRIPTION OF THE FIGURES
[0022] Tous les détails de réalisation sont donnés dans la description qui suit, complétée par les figures 1 à 9, présentées uniquement à des fins d'exemples non limitatifs, dans lesquelles des références identiques indiquent des éléments similaires, et dans lesquelles :  All the details of embodiment are given in the description which follows, supplemented by Figures 1 to 9, presented solely for purposes of non-limiting examples, in which identical references indicate similar elements, and in which:
-la Figure 1a montre de façon schématique le principe de fonctionnement du procédé selon l'invention ; FIG 1a schematically shows the operating principle of the method according to the invention;
-la Figure 1b présente schématiquement un exemple de dispositif de simulation d'une application de couleur selon l'invention ;  FIG. 1b schematically shows an example of a device for simulating a color application according to the invention;
-la Figure 2 illustre à partir d'un exemple, les étapes clés du procédé ; -les Figures 3a et 3b présentent des exemples d'histogrammes d'images ou de zones d'images à traiter selon le procédé de l'invention ; FIG. 2 illustrates, from an example, the key steps of the method; FIGS. 3a and 3b show examples of histograms of images or image zones to be treated according to the method of the invention;
-les figures 4a et 4b montrent des exemples de cartes de répartition des pixels en fonction du niveau considéré ;  FIGS. 4a and 4b show examples of distribution maps of the pixels as a function of the level considered;
-la figure 5 illustre le principe avantageusement utilisé pour additionner les cartes des niveaux pour obtenir les masques d'ombre et/ou de lumière ;  FIG. 5 illustrates the principle advantageously used for adding the level maps to obtain the shadow and / or light masks;
-les figures 6a à 6c présentent, à des fins d'illustration, des sommes partielles de niveaux, jusqu'à obtention d'un calque d'ombre ;  FIGS. 6a to 6c show, for purposes of illustration, partial sums of levels, until a shadow layer is obtained;
-les figures 7a à 7c présentent, à des fins d'illustration, des sommes partielles de niveaux, jusqu'à obtention d'un calque de lumière;  FIGS. 7a to 7c show, for purposes of illustration, partial sums of levels, until a layer of light is obtained;
-les figures 8a à 8f montrent des exemples de génération d'effets de divers types ;  FIGS. 8a to 8f show examples of generation of effects of various types;
-la figure 9 montre un exemple de génération d'effet paillettes. FIG. 9 shows an example of generation of flake effect.
DESCRIPTION DETAILLEE DE L'INVENTION DETAILED DESCRIPTION OF THE INVENTION
[0023] La figure 1b illustre schématiquement un exemple de réalisation d'un dispositif de simulation d'une application de couleur sur une portion d'une image d'un visage d'un utilisateur. Le dispositif comprend un microprocesseur, une mémoire de travail et des instructions de mise en œuvre, un accès à des données d'images à traiter, un module de génération de calques, adapté pour l'extraction à partir d'une image cible à traiter, d'au moins un calque d'ombre et/ou d'un calque de luminosité adapté pour localiser et quantifier des zones de lumière et/ou d'ombre par génération de variations spatiales d'éclairage, un module d'application de calques, adapté pour l'application des calques obtenus par le module de génération de calques, à une l'image cible à traiter. Dans cet exemple, le module de génération de calque est également adapté pour l'obtention, à partir d'une entrée de données de couleur, d'un calque de couleur à appliquer. La mise en œuvre des différents modules est avantageusement réalisée au moyen d'instructions de mise en œuvre, permettant aux modules d'effectuer la ou les opérations spécifiquement prévues pour le module concerné. Les instructions peuvent être sous la forme d'un ou plusieurs logiciels ou modules de logiciels mis en œuvre par un ou plusieurs microprocesseurs. Le ou les modules et/ou le ou les logiciels sont avantageusement prévus dans un produit programme d'ordinateur comprenant un support d'enregistrement ou médium d'enregistrement utilisable par un ordinateur et comportant un code programmé lisible par un ordinateur intégré dans ledit support ou médium, permettant à un logiciel applicatif son exécution sur un ordinateur ou autre dispositif comportant un microprocesseur. Figure 1b schematically illustrates an exemplary embodiment of a device for simulating a color application on a portion of an image of a user's face. The device comprises a microprocessor, a working memory and implementation instructions, an access to image data to be processed, a layer generation module adapted for extraction from a target image to be processed. , at least one shadow layer and / or a brightness layer adapted to locate and quantify zones of light and / or shadow by generating spatial variations of lighting, a layer application module , adapted for applying the layers obtained by the layer generation module, to a target image to be processed. In this example, the layer generation module is also adapted to obtain, from a color data input, a color layer to be applied. The implementation of the various modules is advantageously carried out by means of implementation instructions, allowing the modules to carry out the operation or operations specifically provided for the module concerned. The instructions may be in the form of one or more software or software modules implemented by one or more microprocessors. The module (s) and / or the software (s) are advantageously provided in a computer program product comprising a recording medium or recording medium that can be used by a computer and comprising a programmed code readable by a computer integrated in said medium or medium, allowing an application software execution on a computer or other device comprising a microprocessor.
[0024] Les figures 1a et 2 illustrent le fonctionnement du procédé selon l'invention. La figure 1a est une représentation schématique théorique des manipulations graphiques à effectuer pour obtenir l'image modifiée souhaitée. On observe qu'une série de calques sont superposés les uns aux autres en plus de l'image cible. Ces calques comprennent avantageusement un calque de lumière, un claque des ombres, un calque de couleur. Les deux premiers types de calques seront décrits plus en détails dans ce qui suit. Le calque couleur comprend les informations de couleur prévues pour application sur l'image cible, et leur répartition dans l'espace. L'image cible est avantageusement utilisée en version couleur (lorsque l'image originale reçue est en couleur) pour l'application des calques. Figures 1a and 2 illustrate the operation of the method according to the invention. FIG. 1a is a theoretical schematic representation of the graphic manipulations to be performed to obtain the desired modified image. We observe that a series of layers are superimposed on the to each other in addition to the target image. These layers advantageously include a layer of light, a slap of shadows, a layer of color. The first two types of layers will be described in more detail in the following. The color layer includes the color information provided for application on the target image, and their spatial distribution. The target image is advantageously used in color version (when the original image received is in color) for the application of the layers.
[0025] La figure 2 présente une représentation schématique d'un exemple de mise en œuvre du procédé selon l'invention, à partir d'une image cible constituée d'une image d'une bouche sur laquelle un utilisateur souhaite effectuer une application de couleur de façon optimale, sans atténuer les textures des lèvres. A l'étape 10, l'image cible est reçue et utilisée pour générer deux calques. A l'étape 20, un calque d'ombre est produit, et à l'étape 30, un calque de lumière est généré. A l'étape 40, un calque de couleur est obtenu. Ce calque contient les données colorimétriques que l'utilisateur souhaite appliquer à l'image cible. Le calque 40 peut être obtenu de diverses façons, par exemple par un choix sur un menu de couleurs, ou sur des images servant de modèles, ou encore de façon automatique, par exemple en fonction d'un choix global effectué par l'utilisateur tel qu'un style ou une ambiance. A l'étape 50, les calques d'ombre et de lumière sont additionnés l'un à l'autre avec le calque de couleur obtenu à l'étape 40. Les couches 1 , 2 et 3 illustrées à la figure 2 sont de préférence posées dans l'ordre. Selon diverses variantes, des facteurs multiplicateurs pour l'un ou l'autre calque peuvent être utilisés, afin d'ajuster ou adapter l'influences des divers calques. A l'étape 60, l'image traitée avec les calques est obtenue. Si l'image cible à traiter est en couleurs, celle-ci est tout d'abord transformée en niveaux de gris. La version en niveaux de gris est de préférence utilisée pour l'obtention des calques. Cependant, comme mentionné précédemment, la version couleur (si elle existe) de l'image cible est de préférence utilisée pour l'étape de jumelage des calques tel que montré à la Figure 1. Dans l'exemple illustré aux figures, 256 niveaux sont considérés, afin d'obtenir une haute précision. Pour minimiser les calculs à effectuer et/ou pour augmenter la vitesse de calcul, par exemple dans un cas où des ressources de calculs limitées sont à disposition, le nombre de niveaux peut être limité, mais devrait être supérieur à trois, et plus préférentiellement supérieur à dix. Dans les utilisations où la précision et le réalisme sont des facteurs déterminants, le nombre de niveaux est avantageusement supérieur à 50 ou 100. FIG. 2 is a diagrammatic representation of an exemplary implementation of the method according to the invention, from a target image consisting of an image of a mouth on which a user wishes to carry out an application of color optimally, without mitigating the textures of the lips. In step 10, the target image is received and used to generate two layers. In step 20, a shadow layer is produced, and in step 30, a light layer is generated. In step 40, a color layer is obtained. This layer contains the colorimetric data that the user wishes to apply to the target image. The layer 40 can be obtained in various ways, for example by a choice on a color menu, or on images serving as models, or automatically, for example according to a global choice made by the user. than a style or an atmosphere. In step 50, the shadow and light layers are added to each other with the color layer obtained in step 40. The layers 1, 2 and 3 shown in FIG. 2 are preferably asked in order. According to various variants, multiplying factors for one or the other layer can be used, in order to adjust or adapt the influences of the various layers. In step 60, the image processed with the layers is obtained. If the target image to be processed is in color, it is first converted to grayscale. The grayscale version is preferably used to obtain layers. However, as mentioned above, the color version (if it exists) of the target image is preferably used for the layer matching step as shown in Figure 1. In the example illustrated in the figures, 256 levels are considered, in order to obtain a high precision. To minimize the calculations to be made and / or to increase the speed of calculation, for example in a case where limited computing resources are available, the number of levels can be limited, but should be greater than three, and more preferably higher to ten. In uses where precision and realism are decisive factors, the number of levels is advantageously greater than 50 or 100.
[0026] Les figures 3a et 3b présentent des exemples d'histogrammes d'images cibles. Ces histogrammes indiquent la répartition des pixels de l'image en fonction de leur luminosité. L'abscisse représente les 256 niveaux. Sur cette figure, le niveau 0 correspond à l'obscurité totale (le noir) et le niveau 255 correspond à la luminosité maximum (le blanc), avec une progression de préférence régulière entre les deux limites. L'ordonnée représente le nombre de pixels affectés à chaque niveau. L'ensemble des pixels représente la surface de l'image. Pour le traitement d'une image complète, on utilise avantageusement l'histogramme de l'image complète. Par contre, pour le traitement d'une portion d'image, comme par exemple les lèvres, on utilise avantageusement un histogramme correspondant à cette portion. Figures 3a and 3b show examples of histograms of target images. These histograms indicate the distribution of the pixels of the image according to their brightness. The abscissa represents the 256 levels. In this figure, the level 0 corresponds to the total darkness (the black) and the level 255 corresponds to the maximum brightness (the white), with a progression of regular preference between the two limits. The ordinate represents the number of pixels assigned to each level. The set of pixels represents the surface of the image. For the processing of a complete image, it is advantageous to use the histogram of the complete image. On the other hand, for the treatment of a portion of an image, such as for example the lips, a histogram corresponding to this portion is advantageously used.
[0027] Les figures 4a et 4 b présentent des exemples de cartes de pixels, pour le niveau 30 à la figure 4a et pour le niveau 120 à la figure 4b, en se basant sur l'image cible présentée à la figure 1. Les cartes permettent d'établir une répartition des pixels en fonction du niveau. Figures 4a and 4b show examples of pixel maps, for level 30 in Figure 4a and for level 120 in Figure 4b, based on the target image shown in Figure 1. The cards allow to establish a distribution of pixels according to the level.
[0028] Dans l'exemple illustré dans les figures annexées, l'histogramme utilisé est celui désigné communément « RVB », représentant l'ensemble des valeurs de la gamme RVB, à savoir le rouge (R), le vert (V) et le bleu (B). L'utilisation d'un nombre élevé de niveaux permet l'obtention de résultats plus précis, en outre grâce à des contrastes plus prononcés ou détaillés. Selon une variante de réalisation, on utilise l'histogramme de luminosité. In the example illustrated in the accompanying figures, the histogram used is that commonly referred to as "RGB", representing all the values of the RGB range, namely red (R), green (V) and blue (B). Using a large number of levels allows for more accurate results, in addition to more pronounced or detailed contrasts. According to an alternative embodiment, the luminosity histogram is used.
[0029] L'histogramme RVB peut être représenté par la relation: L = (R+V+B)/3 dans laquelle L signifie luminosité. L'histogramme de luminosité peut être représenté par la relation: L = 0,30 R + 0,60 V + 0,10 B.  The RGB histogram can be represented by the relation: L = (R + V + B) / 3 in which L signifies brightness. The luminosity histogram can be represented by the relation: L = 0.30 R + 0.60 V + 0.10 B.
[0030] A la figure 3b, l'histogramme est scindé en deux sections, séparées par un seuil de démarcation. Ce seuil peut être positionné à divers endroits, en fonction des cas et des caractéristiques recherchées. Il est avantageusement situé au niveau de la médiane M de l'histogramme, de façon à répartir sensiblement 50% des pixels de chaque côté. Du côté gauche de la démarcation ou seuil, les niveaux sont pris en compte pour générer un calque d'ombre. Du côté droit de la démarcation, les niveaux sont pris en compte pour générer un calque de lumière. La flèche 21 indique le sens dans lequel les niveaux sont pris en compte du niveau 0 au niveau 120 dans cet exemple. La flèche 31 indique le sens dans lequel les niveaux sont pris en compte du niveau 255 au niveau 120 dans cet exemple. Si un utilisateur souhaite augmenter le niveau de lumière, le seuil peut être décalé vers la gauche dans cet exemple. Si au contraire un utilisateur souhaite augmenter les ombres, le seuil peut être décalé vers la droite. Le niveau Médiane (M) est de préférence non pris en compte pour les calques d'ombre et lumière. Cela permet de s'assurer qu'un niveau correspondant à un seuil ne soit influencé ni par l'ombre, ni par la lumière. In Figure 3b, the histogram is split into two sections, separated by a threshold of demarcation. This threshold can be positioned in various places, depending on the cases and characteristics sought. It is advantageously located at the median M of the histogram, so as to distribute substantially 50% of the pixels on each side. On the left side of the demarcation or threshold, levels are taken into account to generate a shadow layer. On the right side of the demarcation, the levels are taken into account to generate a layer of light. Arrow 21 indicates the direction in which levels are taken from level 0 to level 120 in this example. Arrow 31 indicates the direction in which levels are taken from level 255 to level 120 in this example. If a user wants to increase the light level, the threshold can be shifted to the left in this example. If instead a user wants to increase the shadows, the threshold can be shifted to the right. The Median level (M) is preferably not taken into account for the shadow and light layers. This makes it possible to ensure that a level corresponding to a threshold is not influenced by the shadow or the light.
[0031] La figure 5 explique de façon schématique comment les cartes de différents niveaux sont préférentiellement additionnées entre elles pour générer le calque d'ombre et/ou de lumière. Au niveau 1 , la carte du niveau 1 est utilisée une fois. Au niveau 2, la carte du niveau 1 est additionnée deux fois, et celle du niveau 2, une fois. Au niveau 3, la carte du niveau 1 est additionnée trois fois, celle du niveau 2, deux fois, et celle du niveau 3, une fois, etc. On en tire la règle suivante, correspondant à : FIG. 5 schematically explains how the maps of different levels are preferentially added together to generate the shadow and / or light layer. At level 1, the level 1 map is used once. At level 2, the level 1 map is added twice, and the level 2 map once. At level 3, the level 1 map is added three times, the level 2 map twice, and the level 3 map once, and so on. The following rule is derived from:
EC=N1 (Carte N1) +(N-1)(Carte N2) +(N-2)(Carte N3) +(N-3)(Carte N4)+... +1Nseuil(Carte Nseuil) où EC est l'ensemble des cartes cumulées jusqu'au niveau N, N correspond au numéro du niveau en cours. EC = N1 (Map N1) + (N-1) (Map N2) + (N-2) (Map N3) + (N-3) (Map N4) + ... + 1Nseuil (Map Nseuil) where EC is the set of cards cumulated up to level N, N is the number of the current level.
Ou, présenté autrement,  Or, presented differently,
CN1  CN1
+ CN1 + CN2 + CN1 + CN2
+ CN1 + CN2 + CN3 + CN1 + CN2 + CN3
+ CN1 + CN2 +C N3 + CN4 + CN1 + CN2 + C N3 + CN4
+CN1 + CN2 +CN3 + CN4 + .... + CNs  + CN1 + CN2 + CN3 + CN4 + .... + CNs
[0032] C'est la somme des sommes partielles évaluées à chaque niveau. L'empilement de toutes les cartes de tous les étages génère le calque recherché. Pour illustrer le procédé, les figures 6a à 6c présentent, à l'aide d'une image d'un visage, les étapes intermédiaires avant d'atteindre la somme totale entre les niveaux 0 et 120. Ainsi, on voit progressivement le résultat d'additions partielles, par exemple pour le niveau 0, la somme pour les niveaux 0 à 10, la somme pour les niveaux 0 à 20, etc, jusqu'à la somme pour les niveaux 0 à 120, montrée à la figure 6c. On constate l'apparition progressive des pixels permettant de générer l'image à traiter. On obtient alors le calque des ombres (figure 6c), avec en noir, les zones fortement ombrées, et en blanc, les zones pâles. It is the sum of the partial sums evaluated at each level. Stacking all cards on all floors generates the desired layer. To illustrate the process, FIGS. 6a to 6c present, using an image of a face, the intermediate steps before reaching the total sum between the levels 0 and 120. Thus, the result of Partial additions, for example for level 0, the sum for levels 0 to 10, the sum for levels 0 to 20, etc., up to the sum for levels 0 to 120, shown in Figure 6c. There is the gradual appearance of pixels to generate the image to be processed. The shadow layer is then obtained (Figure 6c), with the shaded areas in black and the pale areas in white.
[0033] Les figures 7a à 7c montrent un exemple similaire, pour l'addition des niveaux 255 à 120. Au départ, le niveau 255 seul, puis la somme des niveaux 255 à 250, puis la somme des niveaux 255 à 240, puis la somme des niveaux 255 à 230, puis la somme des niveaux 255 à 220, etc, jusqu'à la somme des niveaux 255 à 120. On obtient alors le calque des lumières (dernière image de la figure 7c), avec en noir, les zones fortement éclairées, et en blanc, les zones sombres. Ce mode de présentation du calque, avec le noir signifiant la présence d'informations de lumière, évoque une image « inversée ». En pratique, il n'est pas utile de générer toutes ces étapes intermédiaires. Seule l'étape finale avec la somme des niveaux par exemple de 0 à 120 ou de 255 à 120 est requise. Ce calque de transparence est caractérisé par une forte opacité là où la lumière est maximale et une transparence qui augmente plus la lumière diminue. Ainsi, une couleur appliquée sous ce calque a un rendu qui tient compte des variations d'illuminations. La couleur est rendue à l'identique là où la transparence est forte et subit les modifications de flou et d'illuminations sans être dénaturée. FIGS. 7a to 7c show a similar example, for the addition of the levels 255 to 120. Initially, the level 255 alone, then the sum of the levels 255 to 250, then the sum of the levels 255 to 240, then the sum of the levels 255 to 230, then the sum of the levels 255 to 220, etc., until the sum of the levels 255 to 120. We obtain then the layer of the lights (last image of the figure 7c), with in black, the brightly lit areas, and in white, the dark areas. This mode of presentation of the layer, with the black signifying the presence of information of light, evokes an "inverted" image. In practice, it is not useful to generate all these intermediate steps. Only the final step with the sum of the levels for example 0 to 120 or 255 to 120 is required. This layer of transparency is characterized by a high opacity where the light is maximum and a transparency which increases more the light decreases. Thus, a color applied under this layer has a rendering that takes into account the variations of illuminations. The color is rendered the same where the transparency is strong and undergoes modifications of blur and illumination without being distorted.
[0034] Dans l'exemple correspondant à la Figure 3b, le calque des ombres correspond donc à la somme des sommes partielles (pour chaque étage) entre le niveau 0 et le niveau 120. Le calque des lumières correspond à la somme des sommes partielles (pour chaque étage) entre le niveau 255 et le niveau 120. [0035] Selon une variante, le procédé est modifié en ne sélectionnant qu'une fraction des niveaux à empiler au lieu d'empiler les 256 niveaux. On peut par exemple retenir les niveaux ne contenant qu'un certain pourcentage de pixels suffisamment lumineux. Cela permet de créer des effets localisés ou de jouer sur le rendu. En décomposant l'image et en extrayant les composantes d'éclairement, on a ainsi un moyen d'appliquer une couleur de façon complètement adaptée à l'image. Le procédé présenté permet ainsi de créer un calque transparent qui représente les ombres avec leurs différents niveaux d'opacité. Il en est de même pour les lumières. Le calque des ombres comprend l'ensemble des niveaux du niveau 0 au niveau Médiane -1 , dans le cas où le seuil correspond à la médiane. In the example corresponding to FIG. 3b, the shadow layer corresponds to the sum of the partial sums (for each stage) between the level 0 and the level 120. The layer of the lights corresponds to the sum of the partial sums (for each floor) between level 255 and level 120. According to one variant, the method is modified by selecting only a fraction of the levels to be stacked instead of stacking the 256 levels. For example, the levels containing only a certain percentage of sufficiently bright pixels can be retained. This makes it possible to create localized effects or to play on the rendering. By decomposing the image and extracting the illumination components, there is thus a way to apply a color in a manner fully adapted to the image. The presented process allows to create a transparent layer that represents the shadows with their different levels of opacity. It is the same for the lights. The shadow layer includes all levels from level 0 to Median level -1, in the case where the threshold corresponds to the median.
[0036] Pour permettre de recréer les différents niveaux de l'intensité de l'ombre, on détermine le niveau 1 comme le niveau le plus ombragé possible, c'est à dire noir (#000000) et le niveau Médiane -1 comme le moins ombragé. Les pixels du calque des ombres sont de couleur noir absolu (#000000) et possèdent une opacité différente pour chaque niveau, représentée par une valeur d'opacité (Alpha) « Op ». Pour obtenir la valeur d'opacité correspondant à chaque niveau, l'ensemble des niveaux que représentent les ombres est divisé par la valeur maximum de l'opacité, c'est dire 100%.  To enable the different levels of the intensity of the shadow to be recreated, level 1 is determined as the most shaded level possible, that is to say black (# 000000) and the median level -1 as the less shady. The pixels in the shadow layer are absolute black (# 000000) and have different opacity for each level, represented by an opacity value (Alpha) "Op". To obtain the opacity value corresponding to each level, all the levels represented by the shadows are divided by the maximum value of the opacity, ie 100%.
Op = 100/Nniveau Op = 100 / Nth
Donc l'opacité de Nmédiane - 1 = Niveau/100 et pour N1 = Nniveau x (100/Nniveau) = 100. So the opacity of Nmédiane - 1 = Level / 100 and for N1 = Nniveau x (100 / Nniveau) = 100.
Pour connaître l'opacité d'une zone de pixels à un niveau déterminé n, on utilise la relation suivante pour le calque des ombres : To know the opacity of an area of pixels at a given level n, we use the following relation for the layer of shadows:
Op = 1 +(NR - NC) x 100/Nbre de Niveaux  Op = 1 + (NR - NC) x 100 / Number of Levels
Où :  Or :
NR est le niveau pour lequel on désire connaître l'opacité.  NR is the level for which you want to know the opacity.
NC est le numéro de la carte pour laquelle on désire connaître l'opacité.  NC is the number of the card for which opacity is desired.
[0037] Par exemple, le calcul d'opacité de la carte 2 du niveau 3, sur un total de 120 niveaux, donnerait : For example, the opacity calculation of the level 2 map 2, out of a total of 120 levels, would give:
Op= 1 +(3 - 2) X 100/120 = 1 ,6.  Op = 1 + (3 - 2) X 100/120 = 1, 6.
[0038] Pour le calque des lumières, l'opacité est calculée comme suit : For the layer of lights, the opacity is calculated as follows:
Op = 1 - (NR - NC) x 100/Nbre de Niveaux. Op = 1 - (NR - NC) x 100 / Number of Levels.
[0039] Les pixels du calque des lumières sont de couleur blanche sur fond transparent (Alpha).  The pixels of the layer of lights are white on a transparent background (Alpha).
[0040] Selon une variante avantageuse de l'invention, divers types d'effets sont susceptibles d'être appliqués sur l'image à traiter. Ces effets permettent de varier les nuances de couleurs à appliquer. Par ailleurs, pour une application dans un simulateur de maquillage virtuel, plusieurs effets imitant ceux de certains types de maquillages peuvent être prévus, afin d'élargir les possibilités de simulation. Ainsi, un utilisateur peut tester virtuellement une quasi infinité de possibilités sans devoir subir les contraintes du maquillage et démaquillage à répétition. Il peut par ailleurs conserver en mémoire les diverses simulations effectuées, pour référence ultérieure. Les effets se présentent sous différents calques représentant des zones d'ombre et lumière. Ils sont avantageusement obtenus de façon similaire aux calques d'ombre et de lumière préalablement décrits. On obtient de la sorte une mise en oeuvre permettant une transposition sur l'image cible sans perte de réalisme. According to an advantageous variant of the invention, various types of effects may be applied to the image to be processed. These effects vary the color shades to apply. Moreover, for an application in a virtual make-up simulator, several effects imitating those of certain types of makeup may be provided, in order to widen the possibilities of simulation. Thus, a user can virtually test an almost infinite number of possibilities without having to undergo the constraints of make-up and makeup remover. It can also keep in memory the various simulations performed, for future reference. The effects are presented under different layers representing areas of shadow and light. They are advantageously obtained in a manner similar to the previously described shadow and light layers. In this way, an implementation is obtained which allows a transposition on the target image without loss of realism.
[0041] Selon une option avantageuse, les calques d'effets peuvent eux-mêmes subir des traitements et/ou réglages tels que l'opacité, le flou linéaire ou non linéaire, la coloration, etc. Ils peuvent par ailleurs être cumulés, de préférence en respectant un certain ordre.  According to an advantageous option, the effect layers can themselves undergo treatments and / or adjustments such as opacity, linear or non-linear blur, coloring, etc. They can also be accumulated, preferably by respecting a certain order.
[0042] Ci-dessous sont présentés différentes combinaisons pour obtenir certains types d'effets tels que le mat, le brillant, le crémeux, le « gloss », etc. Ces effets sont présentés à titre d'exemples non limitatifs. Une pluralité d'autres effets et/ou combinaisons d'effets peuvent être obtenus. L'effet mat consiste à supprimer de la brillance de la zone à traiter, par exemple la bouche zbiC, tel qu'illustré à la figure 8a. Le but est d'atténuer ces brillances en les remplaçant par de la couleur. Tel qu'illustré à la figure 8a, pour obtenir un effet mat, une zone couvrant par exemple 60% des pixels considérés comme l'ensemble brillance est déterminée. Selon les cas, en fonction de l'effet désiré, une autre valeur que 60% peut être utilisée. Un calque es60BC représente l'addition de l'ensemble des niveaux compris de 255 vers 0 avec une valeur alpha identique pour chacun des niveaux. Le seuil de démarcation étant pour cet exemple à 60%, les niveaux pris en compte vont de 255 à 102 environ, de façon à obtenir environ 60% de lumière. Le mode d'addition des niveaux est similaire à celui décrit précédemment pour un seuil positionné au niveau de la médiane (figure 2 et figure 5). Below are presented different combinations to obtain certain types of effects such as matte, glossy, creamy, "gloss", etc. These effects are presented as non-limiting examples. A plurality of other effects and / or combinations of effects can be obtained. The matt effect consists of removing from the gloss of the area to be treated, for example the mouth zbiC, as shown in Figure 8a. The goal is to mitigate these brilliances by replacing them with color. As illustrated in FIG. 8a, to obtain a matt effect, an area covering for example 60% of the pixels considered as the gloss set is determined. Depending on the desired effect, a value other than 60% may be used. An es60BC layer represents the addition of the set of levels from 255 to 0 with an identical alpha value for each level. As the demarcation threshold for this example is 60%, the levels taken into account range from about 255 to about 102, so as to obtain about 60% of light. The level addition mode is similar to that previously described for a threshold positioned at the median level (FIG. 2 and FIG. 5).
[0043] Ce calque permet d'obtenir une image en niveau de gris zbiCM de la bouche mate. Cette image sert de nouvelle base pour déterminer un calque de lumière, comme préalablement décrit. A cette étape, on utilise de préférence la médiane de l'histogramme de l'image zbiCM. Pour reconstruire l'image de la bouche avec un rendu mat, il suffit alors de superposer les calques esMN créé à partir de la l'image d'origine zbiC et esMB créé à partir de l'image zbiCM dont les brillances ont été supprimées sur le calque zC de la couleur désirée. Les couches 1 , 2 et 3 montrées à la figure 8a sont agencées de façon similaire à celle présentée à l'étape 50 de la figure 2. L'effet satiné, présenté à la figure 8b, consiste à amplifier légèrement la lumière tout en la rendant douce et diffuse dans une zone délimitée. Un calque es60BA, obtenu de façon similaire au calque es60BC décrit pour la figure 8a, est obtenu à partir de l'image cible. En ajoutant un flou de type Gaussien (ou autre), on obtient le calque es60BA + EF. Ce calque permet d'adoucir les zones de brillance. Il est avantageusement appliqué avec une opacité de l'ordre de 50 %. Le rendu satiné final zbiCCS, est obtenu en superposant les calques d'ombre esMNA et de lumière esMBA créés à partir de la l'image d'origine zbiC dont le but est de transposer la texture des lèvres, avec le calque es60BA+EF qui permet l'amplification de la lumière. Ces calques sont posés sur le calque zC, le calque de la couleur désirée. Les couches 1 , 2, 3 et 4 montrées à la figure 8b sont agencées de façon similaire à celle présentée à l'étape 50 de la figure 2. This layer provides a gray level image zbiCM of the matte mouth. This image serves as a new base for determining a light layer, as previously described. At this stage, the median of the histogram of the zbiCM image is preferably used. To reconstruct the image of the mouth with a matte rendering, then simply superimpose the esMN layers created from the original image zbiC and esMB created from the image zbiCM whose glosses were removed on the zC layer of the desired color. The layers 1, 2 and 3 shown in FIG. 8a are arranged in a manner similar to that presented in step 50 of FIG. 2. The satin effect, shown in FIG. 8b, consists in slightly amplifying the light while at the same time making it soft and diffuse in a defined area. An es60BA layer, obtained in a similar manner to the es60BC layer described for Figure 8a, is obtained from the target image. By adding a Gaussian (or other) type of blur, we obtain the es60BA + EF layer. This layer makes it possible to soften the areas of brightness. It is advantageously applied with an opacity of the order of 50%. The final satin rendering zbiCCS, is obtained by superimposing the esMNA shadow and esMBA light layers created from the original zbiC image whose purpose is to transpose the texture of the lips, with the es60BA + EF layer which allows amplification light. These layers are placed on the layer zC, the layer of the desired color. The layers 1, 2, 3 and 4 shown in FIG. 8b are arranged in a manner similar to that presented in step 50 of FIG. 2.
[0044] L'effet brillant, présenté à la figure 8c, consiste à amplifier la lumière la plus intense déjà existante dans une zone délimitée. A partir de la zone de l'image cible à traiter zbiC, on détermine un seuil couvrant par exemple 5% des pixels. Une autre valeur que 5% peut être utilisée, en fonction des effets souhaités. Le calque es5BA représente l'addition de l'ensemble des niveaux compris de 255 vers 0 sans valeur Alpha (opacité de 100%), jusqu'à l'atteinte du seuil de 5%. Afin d'éviter un trop fort contraste, un léger flou ou anti-aliasing peut être appliqué sur ce calque. Le rendu brillant final zbiCCB, est obtenu en superposant les calques d'ombre esMNA et de lumière esMBA créés à partir de l'image d'origine zbiC au calque es5BA qui permet l'amplification de la lumière, le tout sur le calque zC de la couleur désirée. Les couches 1 , 2, 3 et 4 montrées à la figure 8c sont agencées de façon similaire à celle présentée à l'étape 50 de la figure 2. L'effet nacré, présenté à la figure 8d, consiste à amplifier la lumière sur une grande surface dans une zone délimitée et aussi à amplifier le contraste de la texture. A partir de la zone de l'image cible à traiter zbiC, on détermine un seuil couvrant par exemple 70% des pixels. Une autre valeur que 70% peut être utilisée, en fonction des effets désirés. Le calque es70BA représente la somme de l'ensemble des niveaux compris de 255 vers 0 avec une valeur Alpha identique pour chaque niveau. Le seuil de démarcation étant pour cet exemple à 70%, les niveaux pris en compte vont de 255 à 76 environ, de façon à obtenir environ 70% de lumière. Le mode d'addition des niveaux est similaire à celui décrit précédemment pour un seuil positionné au niveau de la médiane (figure 2 et figure 5).  The brilliant effect, shown in Figure 8c, is to amplify the most intense light already existing in a defined area. From the zone of the target image to be processed zbiC, a threshold covering for example 5% of the pixels is determined. A value other than 5% can be used, depending on the desired effects. The es5BA layer represents the addition of the set of levels from 255 to 0 with no Alpha value (opacity of 100%) until the threshold of 5% is reached. To avoid too much contrast, a slight blur or anti-aliasing can be applied on this layer. The final glossy rendering zbiCCB, is obtained by superimposing the esMNA shadow and esMBA light layers created from the original zbiC image to the es5BA layer that allows the amplification of light, all on the zC layer of the desired color. The layers 1, 2, 3 and 4 shown in FIG. 8c are arranged in a similar manner to that presented in step 50 of FIG. 2. The pearlescent effect, shown in FIG. 8d, consists of amplifying the light on a large area in a delimited area and also to enhance the contrast of the texture. From the zone of the target image to be processed zbiC, a threshold covering for example 70% of the pixels is determined. Another value than 70% can be used, depending on the desired effects. The es70BA is the sum of the set of levels from 255 to 0 with the same Alpha value for each level. The threshold of demarcation being for this example at 70%, the levels taken into account range from 255 to about 76, so as to obtain about 70% of light. The level addition mode is similar to that previously described for a threshold positioned at the median level (FIG. 2 and FIG. 5).
[0045] A partir d'une seconde image zbiC +E3, dont le contraste a été amplifié sur des zones stratégiques, un autre calque es50BAC est créé. Le rendu nacré final zbiCCN, est obtenu en superposant les calques d'ombre esMNA et de lumière esMBA créés à partir de l'image d'origine zbiC dont le but est de transposer la texture d'origine, avec le calque es70BA dont l'opacité est faible, avec le calque es50BAC qui permet d'accentuer le relief par la lumière. Ces calques sont superposés au calque zC de la couleur désirée. Les couches 1, 2, 3, 4 et 5 montrées à la figure 8d sont agencées de façon similaire à celle présentée à l'étape 50 de la figure 2.  From a second image zbiC + E3, whose contrast has been amplified on strategic areas, another es50BAC layer is created. The final nacreous rendering zbiCCN, is obtained by superimposing the esMNA shadow and esMBA light layers created from the original zbiC image whose purpose is to transpose the original texture, with the layer es70BA whose opacity is low, with the layer es50BAC which allows to accentuate the relief by the light. These layers are superimposed on the zC layer of the desired color. Layers 1, 2, 3, 4 and 5 shown in Fig. 8d are arranged similarly to that shown in step 50 of Fig. 2.
[0046] L'effet crémeux, présenté à la figure 8e consiste à amplifier le contraste de la texture sur des zones stratégiques. zbiC est la zone de l'image à partir de laquelle on obtient l'image zbiC+E3 dont le contraste a été amplifié sur des zones stratégiques. Le rendu crémeux final zbiCCC est obtenu en superposant les calques d'ombre esMNA et de lumière esMBA créés à partir de l'image d'origine zbiC aux calques es50BA et es50NA qui permettent d'accentuer le relief. Chaque groupe est de préférence appliqué avec un certain pourcentage d'opacité pour que seul le contraste soit modifié sans amplifier les ombres et lumières. Ces calques sont superposés au calque zC de la couleur désirée. Les couches 1 , 2, 3, 4 et 5 montrées à la figure 8e sont agencées de façon similaire à celle présentée à l'étape 50 de la figure 2. L'effet gloss, présenté à la figure 8f, consiste à amplifier la lumière sur une zone délimitée en donnant un effet de gélatine sur la texture. A partir de la zone à traiter de l'image cible zbiC, un module es15BA couvrant environ 15% des pixels et un autre module es5BA couvrant environ 5% des pixels sont générés, tous deux étant la somme de l'ensemble des niveaux compris de 255 vers 0 avec une valeur Alpha identique pour chaque niveau. Le mode d'addition des niveaux est similaire à celui décrit précédemment pour un seuil positionné au niveau de la médiane (figure 2 et figure 5). Sur ces deux modules, un filtre est appliqué, es15BA+E1 et es5BA+E1. The creamy effect, shown in Figure 8e is to increase the contrast of the texture on strategic areas. zbiC is the area of the image from which we obtain the image zbiC + E3 whose contrast has been amplified on strategic areas. The final zbiCCC creamy rendering is obtained by overlaying the esMNA shadow and esMBA light layers created from the original zbiC image to the es50BA and es50NA layers that enhance the relief. Each group is preferably applied with a certain percentage of opacity so that only the contrast is changed without amplifying the shadows and lights. These layers are superimposed on the zC layer of the desired color. Layers 1, 2, 3, 4 and 5 shown in the figure 8e are arranged similarly to that presented in step 50 of Figure 2. The gloss effect, shown in Figure 8f, is to amplify the light on a defined area giving a gelatin effect on the texture. From the zone to be treated of the target image zbiC, an es15BA module covering approximately 15% of the pixels and another es5BA module covering approximately 5% of the pixels are generated, both being the sum of the set of the included levels of 255 to 0 with an identical Alpha value for each level. The level addition mode is similar to that previously described for a threshold positioned at the median level (FIG. 2 and FIG. 5). On these two modules, a filter is applied, es15BA + E1 and es5BA + E1.
[0047] Le rendu gloss final zbiCGT, est obtenu en superposant les deux calques es15BA+E1 et es5BA+E1 sur l'image d'origine zbiC pour un gloss translucide. C'est la variante présentée à la droite de la figure 8f, avec ligne pointillée. Pour un gloss coloré (ligne continue à gauche de la figure), le même procédé est utilisé avec une coloration en plus du calque représentant les niveaux allant de la médiane M à 255, produisant le calque esMBAC+E1. Dans les deux cas les résultats sont directement appliqués sur la zone d'origine zbiC. Les couches 1 et 2, ou 1 , 2 et 3 (selon le cas) montrées à la figure 8f sont agencées de façon similaire à celle présentée à l'étape 50 de la figure 2. Selon une autre variante de réalisation du procédé selon l'invention, on prévoit l'ajout de textures ou motifs en combinant des calques d'origine externe aux calques de l'image initiale. The final gloss rendering zbiCGT, is obtained by superimposing the two layers es15BA + E1 and es5BA + E1 on the original image zbiC for a translucent gloss. This is the variant presented on the right of Figure 8f, with dotted line. For a colored gloss (continuous line on the left of the figure), the same process is used with a coloring in addition to the layer representing the levels going from the median M to 255, producing the layer esMBAC + E1. In both cases the results are directly applied to the zbiC origin area. The layers 1 and 2, or 1, 2 and 3 (as the case may be) shown in FIG. 8f are arranged in a manner similar to that presented in step 50 of FIG. 2. According to another variant of the method according to FIG. invention, the addition of textures or patterns is provided by combining layers of external origin with the layers of the initial image.
[0048] On peut par exemple utiliser des calques conçus à partir d'une autre image, ou tout autre type de calque à effet. Ce module complémentaire peut s'ajouter aux autres ou être utilisé seul. La zone à traiter peut être différente de celle d'origine : dans ce cas, il est préférable que la zone sur laquelle les niveaux sont pris en compte soit identique à celle du module supplémentaire. Pour une application optimale de ce module, le relief de la zone cible est reporté au calque à ajouter. A titre d'exemple, la figure 9 montre l'intégration d'un calque des paillettes. Les paillettes représentent généralement des points de matière métallique qui reflètent la lumière. Un calque zpA les représentent en blanc (calque pouvant être colorisé dans le cas de paillettes de couleur or ou autre) est créé sur fond transparent. Les paillettes refléteront en fonction du niveau de lumière les atteignant. Les paillettes qui sont exposées à la lumière sont donc considérées comme opaques, et celles se trouvant dans l'ombre sont transparentes. Le calque es255NA+esMNA des niveaux noirs est utilisé pour atténuer les paillettes se trouvant dans des zones d'ombre. Ce calque comprend la somme des niveaux de 0 à 255 (seuil noir) auquel on ajoute deux fois la somme des niveaux de 0 jusqu'à la médiane, de façon à cumuler les effets de seuils. Ce calque agit comme un masque en fonction de son opacité. Plus le seuil est opaque, plus la paillette a une opacité faible. On obtient un calque zpAs qui est le module supplémentaire pour donner l'effet de paillettes. Le rendu final zbiCC+zpAs, est obtenu en superposant esMBA, esMNA et zpAs sur le calque zC de la couleur désirée. Les couches 1 , 2 et 3 montrées à la figure 9 sont agencées de façon similaire à celle présentée à l'étape 50 de la figure 2. Les modules complémentaires peuvent être cumulés avec d'autres modules complémentaires ou modules d'effets. For example, it is possible to use layers designed from another image, or any other type of effect layer. This add-on can be added to others or used alone. The zone to be treated may be different from the original one: in this case, it is preferable that the zone on which the levels are taken into account is identical to that of the additional module. For optimal application of this module, the relief of the target zone is transferred to the layer to be added. By way of example, FIG. 9 shows the integration of a layer of flakes. The flakes generally represent points of metallic material that reflect the light. A zpA layer represents them in white (a layer that can be colored in the case of gold or other colored glitter) is created on a transparent background. The flakes will reflect according to the level of light reaching them. The flakes that are exposed to light are therefore considered opaque, and those in the shadow are transparent. The es255NA + esMNA layer of black levels is used to mitigate glitches in shadows. This layer consists of the sum of the levels from 0 to 255 (black threshold) to which the sum of the levels from 0 to the median is added twice, in order to cumulate the effects of thresholds. This layer acts as a mask depending on its opacity. The thinner the opaque threshold, the more the flake has a low opacity. We obtain a layer zpAs which is the additional module to give the effect of flakes. The final rendering zbiCC + zpAs, is obtained by superimposing esMBA, esMNA and zpAs on the zC layer of the desired color. The layers 1, 2 and 3 shown in FIG. 9 are arranged in a manner similar to that presented in step 50 of FIG. 2. The complementary modules can be combined with other complementary modules or effect modules.
Les Figures et leurs descriptions faites ci-dessus illustrent l'invention plutôt qu'elles ne la limitent. En particulier, l'invention et ses différentes variantes viennent d'être décrites en relation avec des calques appliqués sans facteurs de correction ou d'ajustement. Néanmoins, il est évident pour un homme du métier que l'invention peut être étendue à des calques appliqués avec divers facteurs d'ajustement, afin de réduire ou augmenter l'influence de certains paramètres. Ainsi par exemple, la plupart des calques peuvent être modulés avec des opacités variant entre 0 et 100 %. L'invention est par ailleurs présentée avec un exemple particulier en relation avec les lèvres d'un visage. Néanmoins, il est évident pour un homme du métier que l'invention peut être étendue à d'autres zones, en particulier de visages humains ou au visage complet. Enfin, l'invention et ses différentes variantes viennent d'être décrites en relation avec des calques générés sur la base d'histogrammes comportant 256 niveaux. Néanmoins, il est évident pour un homme du métier que l'invention peut être étendue à des calques générés sur la base d'histogrammes comportant un nombre différent de niveaux. Les signes de références dans les revendications n'ont aucun caractère limitatif. Les verbes "comprendre" et "comporter" n'excluent pas la présence d'autres éléments que ceux listés dans les revendications. Le mot The figures and their descriptions made above illustrate the invention rather than limiting it. In particular, the invention and its various variants have just been described in relation to layers applied without correction or adjustment factors. Nevertheless, it is obvious to a person skilled in the art that the invention can be extended to layers applied with various adjustment factors, in order to reduce or increase the influence of certain parameters. For example, most layers can be modulated with opacities ranging from 0 to 100%. The invention is also presented with a particular example in relation to the lips of a face. Nevertheless, it is obvious to a person skilled in the art that the invention can be extended to other areas, particularly human faces or full face. Finally, the invention and its various variants have just been described in relation to layers generated on the basis of histograms comprising 256 levels. Nevertheless, it is obvious to one skilled in the art that the invention can be extended to layers generated on the basis of histograms having a different number of levels. The reference signs in the claims are not limiting in nature. The verbs "understand" and "include" do not exclude the presence of elements other than those listed in the claims. Word
"un" précédant un élément n'exclue pas la présence d'une pluralité de tels éléments. "a" preceding an element does not exclude the presence of a plurality of such elements.
M Médiane  M Median
O Ombre  O Shadow
L Lumière  Light
H Histogramme  H Histogram
zC zone Couleur zC Color area
zbiC zone bouche image Cible zbiC area mouth target image
zbiCGT zone bouche image Cible avec Gloss Transparent zbiCGT Area Mouth Target Image with Transparent Gloss
zbiCGC zone bouche image Cible avec Gloss Couleur zbiCGC area mouth Target image with Gloss Color
zbiCN zone bouche image Cible Couleur Nacrée zbiCN area mouth image Target Color Nacreous
zbiC zone bouche image Cible Mat zbiC area mouth image Target Mat
zbiCCM zone bouche image Cible Couleur Mat zbiCCM area mouth image Target Color Matt
zbiCCC zone bouche image Cible Couleur Crémeux zbiCCC area mouth image Target Color Creamy
zbiCCS zone bouche image Cible Couleur Satinée zbiCCS area mouth image Target Satiny color
esMBA ensemble seuil Médiane Blanc Alpha esMBA set threshold Median White Alpha
esMNA ensemble seuil Médiane Noir Alpha esMNA set threshold Median Black Alpha
es(x)N ensemble seuil (x = pourcentage de pixels compris entre 0 vers 255 de l'histogramme de l'image) Noir es (x) N set threshold (x = percentage of pixels between 0 to 255 of the histogram of the image) Black
es(x)B ensemble seuil (x = pourcentage de pixels compris entre 255 vers 0 de l'histogramme de l'image) Blanc es (x) B set threshold (x = percentage of pixels between 255 to 0 in the histogram of the image) White
es(x)BA ensemble seuil (x = pourcentage de pixels compris entre 255 vers 0 de l'histogramme de l'image) Blanc Alpha (de couleur blanc) es (x) BA set threshold (x = percentage of pixels between 255 to 0 of the histogram of the image) White Alpha (white color)
es(x)BAC ensemble seuil (x = pourcentage de pixels compris entre 255 et 0 de l'histogramme de l'image) Blanc Alpha Colorisé (de couleur désirée) es (x) BAC set threshold (x = percentage of pixels between 255 and 0 of the histogram of the image) Colorized Alpha White (of desired color)
E3 Effet 3 (Filtre non linéaire « Amélioration des bords »)  E3 Effect 3 (Nonlinear Filter "Edge Enhancement")
E1 Effet 1 (Filtre non linéaire « Médiane réduite par Alpha »)  E1 Effect 1 (Nonlinear filter "Median reduced by Alpha")
EF Effet Flou Gaussien  EF Gaussian Blur Effect
zpA zone paillette Alpha zpA Alpha spangle area
zpAs zone paillette Alpha masquée par les seuils zpAs Alpha flake zone masked by the thresholds

Claims

REVENDICATIONS
1. Procédé de simulation d'une application de couleur sur une portion d'une image d'un visage d'un utilisateur comprenant les étapes consistant à : A method of simulating a color application on a portion of an image of a user's face comprising the steps of:
-obtenir une image photographique de l'utilisateur comportant au moins une zone d'application de couleur prévue pour simulation de coloration ;  obtaining a photographic image of the user comprising at least one color application zone intended for color simulation;
-au moins pour la zone d'application de couleur, extraire à l'aide d'un module de génération de calques, au moins un calque d'ombre et/ou un calque de luminosité adapté pour localiser et quantifier des zones de lumière et/ou d'ombre par génération de variations spatiales d'éclairage ;  at least for the color application area, extract using a layer generation module, at least one shadow layer and / or a brightness layer adapted to locate and quantify zones of light and / or shade by generation of spatial lighting variations;
-au moins pour la zone d'application de couleur, obtenir à l'aide d'un module de génération de calques, au moins un calque de couleur à appliquer ;  at least for the color application zone, using a layer generation module to obtain at least one color layer to be applied;
-appliquer, à l'aide d'un module d'application de calques, les calques à l'image cible.  -apply, using a layer application module, the layers to the target image.
2. Procédé de simulation d'une application de couleur selon la revendication 1 , dans lequel les calques sont appliqués selon un ordre dans lequel on retrouve du plan inférieur au plan supérieur : 2. A method of simulating a color application according to claim 1, wherein the layers are applied in an order in which is found from the lower plane to the upper plane:
-une image cible ;  a target image;
-le calque de couleur ;  -the color layer;
-les calques d'ombres et/ou de luminosité.  -the layers of shadows and / or brightness.
3. Procédé de simulation d'une application de couleur selon l'une des revendications 1 ou 2, dans lequel les calques sont générés à partir de l'histogramme de l'image cible. 3. A method of simulating a color application according to one of claims 1 or 2, wherein the layers are generated from the histogram of the target image.
4. Procédé de simulation d'une application de couleur selon l'une des revendications 1 à 3, comportant par ailleurs une étape de détection d'une pluralité de points clés de l'image afin de délimiter la zone à colorer. 4. A method of simulating a color application according to one of claims 1 to 3, further comprising a step of detecting a plurality of key points of the image to define the area to be colored.
5. Procédé de simulation d'une application de couleur selon l'une des revendications 1 à 4, comportant par ailleurs une étape consistant à appliquer également un calque d'effet, comportant un effet ou texture différent de ceux obtenus à partir de l'image cible. 5. A method of simulating a color application according to one of claims 1 to 4, further comprising a step of also applying an effect layer, having an effect or texture different from those obtained from the target image.
6. Procédé de simulation d'une application de couleur selon la revendication 5, dans lequel le calque d'effet est généré à partir d'une image autre que l'image cible. A method of simulating a color application according to claim 5, wherein the effect layer is generated from an image other than the target image.
7. Procédé de simulation d'une application de couleur selon l'une des revendications 1 à 6, dans lequel les calques d'une image cible comportant un histogramme de N niveaux sont susceptibles d'être obtenu par une somme des sommes partielles des pixels des cartes de chacun des étages jusqu'à un niveau seuil permettant d'établir une séparation entre les niveaux utiles pour la détermination d'un calque d'ombre et les niveaux utiles pour la détermination d'un calque de lumière. The method of simulating a color application according to one of claims 1 to 6, wherein the layers of a target image having a histogram of N levels are likely to be obtained by a sum of the partial sums of the pixels of the cards of each of the floors up to a threshold level making it possible to establish a separation between the levels useful for the determination of a shadow layer and the levels useful for the determination of a layer of light.
8. Procédé de simulation d'une application de couleur selon la revendication 7, dans lequel le niveau de seuil d'un histogramme d'une image cible est établi de façon à séparer les pixels en deux portions sensiblement égales. A method of simulating a color application according to claim 7, wherein the threshold level of a histogram of a target image is set to separate the pixels into two substantially equal portions.
9. Procédé de simulation d'une application de couleur selon l'une des revendications 7 ou 8, dans lequel le calque d'ombre est établi en partant du niveau le plus faible en se dirigeant vers le niveau de seuil. The method of simulating a color application according to one of claims 7 or 8, wherein the shadow layer is set from the lowest level towards the threshold level.
10. Procédé de simulation d'une application de couleur selon l'une des revendications 7 à 9, dans lequel le calque de lumière est établi en partant du niveau le plus élevé en se dirigeant vers le niveau de seuil. A method of simulating a color application according to one of claims 7 to 9, wherein the light layer is set from the highest level towards the threshold level.
11. Dispositif de simulation d'une application de couleur sur une portion d'une image d'un visage d'un utilisateur comprenant : Apparatus for simulating a color application on a portion of an image of a user's face comprising:
-un microprocesseur, une mémoire de travail et des instructions de mise en œuvre ;  a microprocessor, a working memory and instructions for implementation;
-un accès à des données d'images à traiter ; access to image data to be processed;
-un module de génération de calques, adapté pour l'extraction à partir d'une image cible à traiter, d'au moins un calque d'ombre et/ou d'un calque de luminosité adapté pour localiser et quantifier des zones de lumière et/ou d'ombre par génération de variations spatiales d'éclairage ;  a layer generation module, adapted for extracting from a target image to be processed, at least one shadow layer and / or a brightness layer adapted to locate and quantify zones of light; and / or shade by generating spatial variations of illumination;
-un module d'application de calques, adapté pour l'application des calques obtenus par le module de génération de calques, à une l'image cible à traiter.  a layer application module, adapted for applying the layers obtained by the layer generation module, to a target image to be processed.
12. Dispositif de simulation d'une application de couleur selon la revendication 11 , dans lequel le module de génération de calque est également adapté pour l'obtention, à partir d'une entrée de données de couleur, d'un calque de couleur à appliquer. 12. A device for simulating a color application according to claim 11, wherein the layer generation module is also adapted to obtain, from a color data input, a color layer to a color layer. apply.
PCT/IB2011/000868 2010-05-04 2011-04-18 Method of processing images for application of a colour WO2011138649A2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
EP11723627.3A EP2593924A2 (en) 2010-05-04 2011-04-18 Method of processing images for application of a colour

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
FR1001915 2010-05-04
FR1001915A FR2959853B1 (en) 2010-05-04 2010-05-04 IMAGE PROCESSING METHOD FOR APPLICATION OF COLOR

Publications (2)

Publication Number Publication Date
WO2011138649A2 true WO2011138649A2 (en) 2011-11-10
WO2011138649A3 WO2011138649A3 (en) 2015-04-30

Family

ID=43499927

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/IB2011/000868 WO2011138649A2 (en) 2010-05-04 2011-04-18 Method of processing images for application of a colour

Country Status (3)

Country Link
EP (1) EP2593924A2 (en)
FR (1) FR2959853B1 (en)
WO (1) WO2011138649A2 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110728618A (en) * 2018-07-17 2020-01-24 阿里巴巴集团控股有限公司 Virtual makeup trying method, device and equipment and image processing method
CN111508036A (en) * 2020-04-13 2020-08-07 网易(杭州)网络有限公司 Image processing method, image processing apparatus, storage medium, and electronic apparatus
CN112037123A (en) * 2019-11-27 2020-12-04 腾讯科技(深圳)有限公司 Lip makeup special effect display method, device, equipment and storage medium
CN112541955A (en) * 2020-12-17 2021-03-23 维沃移动通信有限公司 Image processing method, device and equipment

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2002005249A2 (en) * 2000-06-27 2002-01-17 Rami Orpaz Make-up and fashion accessory display and marketing system and method
JP2009064423A (en) * 2007-08-10 2009-03-26 Shiseido Co Ltd Makeup simulation system, makeup simulation device, makeup simulation method, and makeup simulation program

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
None

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110728618A (en) * 2018-07-17 2020-01-24 阿里巴巴集团控股有限公司 Virtual makeup trying method, device and equipment and image processing method
CN110728618B (en) * 2018-07-17 2023-06-27 淘宝(中国)软件有限公司 Virtual makeup testing method, device, equipment and image processing method
CN112037123A (en) * 2019-11-27 2020-12-04 腾讯科技(深圳)有限公司 Lip makeup special effect display method, device, equipment and storage medium
CN112037123B (en) * 2019-11-27 2023-08-08 腾讯科技(深圳)有限公司 Lip makeup special effect display method, device, equipment and storage medium
CN111508036A (en) * 2020-04-13 2020-08-07 网易(杭州)网络有限公司 Image processing method, image processing apparatus, storage medium, and electronic apparatus
CN111508036B (en) * 2020-04-13 2024-03-22 网易(杭州)网络有限公司 Image processing method, image processing device, storage medium and electronic device
CN112541955A (en) * 2020-12-17 2021-03-23 维沃移动通信有限公司 Image processing method, device and equipment

Also Published As

Publication number Publication date
WO2011138649A3 (en) 2015-04-30
FR2959853A1 (en) 2011-11-11
FR2959853B1 (en) 2014-04-11
EP2593924A2 (en) 2013-05-22

Similar Documents

Publication Publication Date Title
Duan et al. Tone-mapping high dynamic range images by novel histogram adjustment
WO2011015928A2 (en) Image-processing method for correcting a target image in accordance with a reference image, and corresponding image-processing device
Kumar et al. A comprehensive survey on non-photorealistic rendering and benchmark developments for image abstraction and stylization
FR2690822A1 (en) Process for making up the face, in particular the eyes, and device for its implementation.
CN109639960A (en) Image processing apparatus, image processing method and recording medium
WO2011138649A2 (en) Method of processing images for application of a colour
WO2013098512A1 (en) Method and device for detecting and quantifying cutaneous signs on an area of skin
Mould et al. Developing and applying a benchmark for evaluating image stylization
Rahman et al. Image enhancement, image quality, and noise
FR3082649A1 (en) METHOD FOR APPLYING COLORS ON A TEXTURE
Brunick et al. Coloring the animated world: Exploring human color perception and preference through the animated film
Lopez-Moreno et al. Non-photorealistic, depth-based image editing
EP3928291A1 (en) Method for correcting a contour
CN114119847A (en) Graph processing method and device, computer equipment and storage medium
Soranzo et al. Layer and framework theories of lightness
EP3818495A1 (en) Method and device for displaying high-dynamic sonar or radar data
Aswatha et al. An integrated repainting system for digital restoration of Vijayanagara murals
WO2022122625A1 (en) Method for verifying a digital image
Low et al. Pic2PolyArt: Transforming a photograph into polygon-based geometric art
CN102136132A (en) Method for synthesizing human eye vision system perception effect in dark environment
Ambalathankandy et al. Warm-cool color-based high-speed decolorization: an empirical approach for tone mapping applications
Park Secrets of balanced composition as seen through a painter's window: visual analyses of paintings based on subset barycenter patterns
FR3054359A1 (en) METHOD FOR INCRUSTATION OF SOURCE IMAGE IN TARGET IMAGE
Mochizuki et al. Stealing autumn colors
Lü et al. Image watercolorization based on visual weight-map

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: 11723627

Country of ref document: EP

Kind code of ref document: A2

NENP Non-entry into the national phase

Ref country code: DE

WWE Wipo information: entry into national phase

Ref document number: 2011723627

Country of ref document: EP