Digital image color correction device employing fuzzy logic

Abstract: A digital image color correction device employing fuzzy logic, for correcting a facial tone image portion of a digital video image, characterized in that it comprises: a pixel fuzzifier unit (1) receiving in input a stream of pixels belonging to a sequence of correlated frames of a digital video image and computing a multi level value representing a membership of each pixel to a skin color class; a global parameter estimator (2) receiving in input each of said pixel and the relative membership value, and computing a first and a second parameter which define the characteristics of a portion of said image that belongs to said skin color class; a processing unit (3) connected downstream to said global parameter estimator and to said pixel fuzzifier unit and adapted to correct each of the pixels of said portion of the image that belongs to said skin color class, according to said first global parameter (300), to obtain corrected pixels; and a processing switch (4) for outputting said pixels or said corrected pixels according to said second global parameter (400).

Description: The present invention relates to a digital image color correction device employing fuzzy logic. More particularly, the invention relates to a device for color class correction and in particular for the correction of the skin color class of a digital image. Many color models have been proposed to formalize color description; in most of them a color is represented as a point in a three-dimensional discrete space. These spaces are very useful for a mathematical manipulation of color, but they are very far from how human beings usually describe this feature. In fact, in everyday life, when describing an object by its color, people use labels like "green" or "blue", enriched with qualifiers like "deep" or "dark". It can be noticed that a linguistic description is somewhat vague and imprecise. A label identifies a set in a color space; in fact an object that is given a single label is really made up by many different shades. What appears to be a lack of precision is a form of approximation that allows to deal in a simple and easy way with a big amount of information. Moreover, it would be inconceivable to describe an object by specifying color coordinates for each point in a discrete space, and even doing this, it wouldn't add any useful information for people. As said before, a linguistic label in a color space identifies a set inside it; but when trying to give a precise definition of this set, it proves to be not so simple, because colors gradually tone down in one another, and for some of them it is possible to combine a label only arbitrarily. This shows the real nature of colors expressed in a linguistic form: they are name of fuzzy sets whose membership functions can be defined on any color space. For such a fuzzy set the term "color class" will be used. Since most color spaces are three-dimensional, the membership functions we are going to define are surfaces in a quadrimensional space. There are two main problems in defining these functions: first of all, since membership functions must be defined on the basis of human perception of colors, for each color class and for each point in the color space the membership value should be chosen by human observers. Unfortunately color spaces have millions of points and so the second problem is the resulting amount of data, that requires a table with millions of entries for a single class description. The approach that is used is based on linguistic rules to define a color class. Rules will refer to a color space distinguishing hue, saturation and lightness. Among these spaces we choose HSV. A brief description of RGB and HSV color spaces follows. In the RGB color space a color is represented by the three primary component red, green and blue. This space is shaped as a cube, whose vertices coincide with the pure colors red, green, blue, cyan, magenta, yellow, black and white (see figure 1). The gray scale lays on the diagonal, which joins together the origin (black) and the opposite vertex (white). Monitors, televisions and some other similar visualization devices make use of this color space for visualizing images. This kind of color representation is different from the way we perceive a color (we generally identify a hue, an intensity and a saturation). As the HSV color space represents a color with hue, saturation and value (intensity), it has been chosen for the identification of colors. This space can be represented as an upturned cone (see figure 2), where the value varies moving on the axis, the saturation varies moving on the radius of the circle and the hue varies with the angle of the circle. The detection of the skin color class is performed by means of fuzzy sets, defined on H, S and V. In this space a class can be characterized by assertions on the components. For example for a point p and for the blue color class we can say: IF h p , is blue h AND s p is highs AND v p is high v THEN p is blue where h p , s p and v p are the hue, saturation and value of p. While the consequent part of the rule refers to the color class "blue", the antecedent one contains the fuzzy sets blue h , high s , and high v , whose membership functions are defined respectively on H, S and V. Note that high s and high v are different fuzzy sets; in fact the membership functions have different domains, even if they may have the same form. Once the fuzzy sets in their antecedent part have been defined, they can be used to compute the membership value of p to the class. If u h , u s and u v are the membership function on H, S and V for a given color class, the membership value of a point p with coordinates (h p , s p , v p ) to such class is computed as: u p =T(u h (h p ), u s (s p ), u v (v p )) where T is the T-norm operator, which implements the "and" logical connective in the sentence. Membership functions for the fuzzy sets of the antecedent can be experimentally obtained, by observing color variations when changing h, s or v with the aid of some graphical tools. It is also necessary to choose a T-norm operator for the and connective in the rules. It may be observed that the rule-based approach does not give the same freedom in defining color classes, since in general it is not possible to associate arbitrary values to different points of the HSV space. This is true, but on the other hand the ability to have a punctual resolution in membership function definition may not be so useful. Choosing a membership value different from 0 or 1 for an (h,s,v) triplet would be an arbitrary matter, while it is important to hold the intuitive and visual shading of colors. In this approach, with an eight bit component quantization, only three 256 table entries are needed to define the class completely. Classical image processing operators are usually applied to the full image or to a previously selected part of it; in this last case the selection is usually done by hand or through selection tools based on some characteristics of the pixel. Suppose we want to apply some operators to a particular color class in the image. The use of operators that modify hue, saturation or value of selected pixel would allow different color corrections to be applied on different color classes. The region where the operator should work, could be identified by an a-cut extracted from a fuzzy set previously found. A problem arises when determining the best alfa-level for the cut; anyway the use of a crisp set would produce undesirable and noticeable effects on the borders of the selected region. A solution of this problem can be found in using soft operators. This kind of operators allows the application to a region identified by a fuzzy set instead of a crisp set. The definition of a such operator O' in terms of a traditional one O follows: O'(p)==(p)*a p + p*(1-a p ) where p is the pixel and a p is its membership value to a color class. If a=0 the pixel is unmodified, while for a=1 the traditional operator O is applied. In any other case O' will be the weighted average between p and O(p). The average is computed on the color space, separately on each component. Unfortunately the result of the interpolation depends on the color space, because of the non-linearity of the transformation from a color space to another one. In this particular case the HSV color space is not well suited to this operation, because colors on the path from p to O(p) are not those expected. Very good results would be obtained by moving to CIEluv or CIElab color spaces before computing the average. Unfortunately the transformations from HSV to these color spaces are quite complex. Quite good results can be obtained also in the RGB color space, with the advantage of a simpler transformation from HSV. The aim of the present invention is to provide a digital image color correction device which allows to reproduce the skin color in a facial tone image as closer as possible to the reality. Within this aim, an object of the present invention is to provide a digital image color correction device which is capable of identifying facial tone image of a digital image, particularly of TV images and, if necessary, determine the proper corrections. Another object of the present invention is to provide a digital image color correction device which could operate only on the facial tone portion of the digital image. Another object of the present invention is to provide a digital image color correction device which can recognize the skin color class in a digital image and, on the basis of saturation and value characteristics detected inside the recognized class, apply the suitable corrections. This aim, these objects and others are achieved by a digital image color correction device employing fuzzy logic, for correcting a facial tone image portion of a digital video image characterized in that it comprises: a pixel fuzzifier unit receiving in input a stream of pixels belonging to a sequence of correlated frames of a digital video image and computing a multilevel value representing a membership of each pixel to a skin color class; a global parameter estimator receiving in input each of said pixel and the relative membership value, and computing a first and a second parameter which define the characteristics of a portion of said image that belongs to said skin color class; a processing unit connected downstream to said global parameter estimator and to said pixel fuzzifier unit and adapted to correct each of the pixels of said portion of the image that belongs to said skin color class, according to said first global parameter, to obtain corrected pixels; and a processing switch for outputting said pixels or said corrected pixels according to said second global parameter. The above aim and objects are also achieved by a method for color correcting, by means of fuzzy logic, a facial tone image portion of a digital video image composed by a sequence of correlated frames, characterized in that it comprises the steps of: defining three fuzzy sets to be used to identify a skin color class of a facial tone image portion of a digital video signal; examining the image to determine if it is a facial tone image; in case of positive response, carrying out a color correction of the pixels of the facial tone image portion; and outputting a corrected facial tone image portion. Further characteristics and advantages of the present invention will become apparent from the description of a preferred embodiment of a digital image color correction device, illustrated only by way of non-limitative example in the accompanying drawings, wherein: figure 1 shows the RGB color space; figure 2 shows the HSV color space; figure 3 shows three fuzzy sets for the skin color class according to the algorithm implemented with the device according to the present invention; figure 4 shows fuzzy sets for the evaluation of correction parameters, according to the algorithm implemented with the device of the present invention; figure 5 is a block diagram showing the image processing device of the present invention is applied; figure 6 is a diagram showing the construction of the pixel fuzzifier unit of the image processing device shown in figure 5; figure 7 is a diagram showing the construction of the global parameter estimator of the image processing device shown in figure 5; figure 8 is a diagram showing the construction of the processing unit of the image processing device shown in figure 5; figure 9 is a diagram showing the construction of the processing switch unit of the image processing device shown in figure 5. The algorithm we are going to present makes use of the above exposed methodology; it has been implemented to be able to recognize inside an image the skin color class and to apply automatically some corrections only to this class. Three fuzzy sets, defined on H, S and V, are used to identify the skin color class. They are shown in Figure 1. The membership value to the skin color class of each pixel is computed by the aggregation of the membership value to the fuzzy sets on H, S, and V. The rule used to identify the skin color class is the following: IF h p is H_Skin h AND s p is S_Skin s AND v p is V_Skin v THEN p has skin color The first step of the algorithm consists in examining the image to determine if it is a "facial tone image", and consecutively find the corrections it would need. To be considered "facial tone", an image is required to have a skin color class area wider than a fixed threshold. This threshold has been empirically found. If this requirement is not met no further processing is carried on. Otherwise the next step consists in a contextual evaluation of the membership value to the skin color class. This is performed by a mean operator. This step results to be necessary because it is able to reduce some undesirable effects. It often happens to process an image with fine grain textures, obtained by using pixels of different colors, which have the appereance of uniformly colored regions. When a single color class is processed the appearance of the texture could be altered because only some pixels of the textured region belong to the color class and only those pixels will be modified. First a mean operator is applied on the image and the membership values of each pixels are calculated. To identify the parameters of the corrections some other membership functions are used. These functions, that are shown in figure 4, relate to different levels of saturation and value (low, medium and high); once we have the membership value of each pixel for these fuzzy sets, it is possible to obtain some indexes concerning the degree of saturation and value inside the skin color class. In this way the region corresponding to the skin color class has been divided in fuzzy subregions: for each subregion the mean saturation and the mean value are calculated. Two other values are considered: the prototypes of skin saturation and skin value. These have been chosen empirically, after having examined several images. with the use of all these quantities the parameters for the corrections are computed. In this way the corrections are automatically calculated on the basis of the current image. The formula that computes the correction for the saturation is different from the one that computes the correction for the value. The reason of this is based on the different sensitivity of the eye to variations in saturation and variations in value. Now, a description will be given of an embodiment of the present invention by referring to figure 5 and figure 6. Figure 5 represents an image processing apparatus of the present invention which generally has an input device (not shown), a pixel fuzzifier unit 1, a global parameters estimator 2, a processing unit 3, a processing switch 4 and an output unit (not shown). The input device is assumed to produce a stream of pixels 100 belonging to a sequence of highly correlated frames, such as a digital TV signal or an MPEG stream. The pixel fuzzifier 1 takes a multilevel bit pixel in input and, after a contextualization step, computes a multilevel value 200 representing a membership of the pixel to skin color class. The global parameter estimator 2 takes in input the original pixel 100 and its membership value 200 and, after a whole field has been examined, it computes two global quantities 300, 400 to be used in the following processing steps during the computation of the next field. The processing unit 3 makes use of the pixel 100, its membership value 200 and one of the global parameters, 400, to accomplish the desired color correction. The processing switch 4 outputs the original pixel 100 or the corrected one 100' on the basis of the other global parameter, 300. The output unit is assumed to be a suitable device for further processing or image visualization/storage. Figure 6 shows the construction of the pixel fuzzifier. This unit includes a contextual processing unit 5, a conversion unit 6 and a membership function evaluation unit 7. The conversion unit 6 applies a transformation from the original RGB color space to the HSV color space, more suitable for the identification of color classes. The membership function evaluation unit 7 computes the membership value of the pixel to the skin color class. The fuzzy set on the HSV space is defined by means of the aggregation of three fuzzy sets, defined on the H, S and V axes separately. The contextual processing unit 5 has been introduced to reduce undesirable effects arising when processing textured regions; in fact fine textured region that are not noticeable in the original image may become manifest after the color correction. The contextual processing consists of spacial filtering. Due to the properties of the RGB color space, this processing has been introduced before the color space conversion. Figure 7 shows the construction of the global parameters estimator 2. It consists of two parts: the first, 8, estimates the area of the skin color class inside the image, the second, 9, computes the coefficients for the correction. Since the coefficients evaluated on a frame should be used for the processing of the same frame, a frame buffer should be introduced to delay the processing. But assuming a high correlation between contiguous frames, the coefficients related to a frame are computed using the information of the precedent frame. In this way it is possible to avoid the frame buffer and the delay it should require. The area of the skin color class is evaluated on the basis of the percentage of pixels belonging to the class. There are two correction coefficients, one for the saturation and one for the value. They are computed making use of fuzzy inference. The evaluation of each correction coefficient depends on some quantities, which represent the average membership values to the classes low, high and medium value and saturation, and the average saturation and value inside the above-mentioned classes. Ale @ rules used to evaluate the coefficients for the correction are constructed on the basis of these quantities. An example of such a rule is the following: IF skin color class IS high-saturated THEN decrement saturation or IF skin color class IS low-valued THEN increment value. The formulas used to increment or decrement the saturation and the value are quite different. The choice of using different formulas has been done on the basis of some considerations regarding the way the eye perceives variations in saturation in respect to variation in values. Figure 8 represents the construction of the processing unit 3. This consists of a conversion unit 6, a correction unit 11, a back-conversion unit 12 and a soft-switch unit 13. The conversion unit 6 is the same used in the pixel fuzzifier unit 1. The correction unit 11 receives in input the pixel 100 and the coefficient 400 for the correction from the global parameter estimator 2 and performs the correction. The corrections consist of adding the coefficient 400, whose sign depends on considerations made on the basis of the fuzzy rules, to the original coordinate of the pixel 100. The following unit, 12, converts back the processed pixel to the RGB color space. A weighted average is performed by the soft-switch unit 13, that receives in input the membership value 200 of the pixel to the skin color class, the original pixel 100 and the corrected one (i.e. the output from the back-conversion unit 12). The more the pixel belongs to the skin color class, the more the pixel is corrected. A pixel with membership value close to zero is not affected by the correction. The output 500 of the soft-switch unit 13, is input to the processing switch unit 4, whose construction is shown in Figure 9. This unit is constituted by a selector 14. This unit receives in input the original pixel 100, the corrected one 500 and the first global parameter 300 representing the area of the skin color class. If the skin color class has an area large enough, the processing switch unit 4 outputs the corrected pixel 100' otherwise it outputs the original pixel 100. The output unit is assumed to be a suitable device for further processing or image visualization or storage. It has thus been shown that the described invention achieves the intended aim and objects. In fact, only the portion of the digital video image which represents a facial tone image is processed in order to bring the colors of this portion as much closer as possible to the real colors that the human eye can perceive during everyday life. Thus the processing and the consequent correction of the concerned pixels is applied only if the image is identified as "facial tone image"; if the input image is not a "facial tone image" no processing will be carried out. The corrections are determined and applied in the HSV color space. The transformation to HSV color space is necessary because in this space the description of a color is much more intuitive than in the RGB color space, so the description of the skin color class results to be easier than in RGB space. When in the above disclosure reference is made to "pixel" it is obviously meant that each pixel of the digital video image undergoes the above-explained processing. The present invention thus conceived is susceptible of numerous modifications and variations, all of which are within the scope of the inventive concept. All the details may also be replaced with other technically equivalent elements. In the practical embodiment of the present invention, the materials used, as well as the shapes and the dimensions, may be any according to the requirements without thereby abandoning the scope of the protection of the claims that follow. Where technical features mentioned in any claim are followed by reference signs, those reference signs have been included for the sole purpose of increasing the intelligibility of the claims and accordingly, such reference signs do not have any limiting effect on the scope of each element identified by way of example by such reference signs.

Claims: A digital image color correction device employing fuzzy logic, for correcting a facial tone image portion of a digital video image, characterized in that it comprises: a pixel fuzzifier unit (1) receiving in input a stream of pixels (100) belonging to a sequence of correlated frames of a digital video image and computing a multilevel value (200) representing a membership of each pixel to a skin color class, said skin color class being identified by a definition of three fuzzy sets; a global parameter estimator (2) receiving in input each of said pixel and the relative membership value, and computing a first (300) and a second parameter (400) which define the characteristics of a portion of said image that belongs to said skin color class to determine whether said image is a facial tone image; a processing unit (3) connected downstream to said global parameter estimator (2) and to said pixel fuzzifier unit (1) and adapted to correct each of the pixels of said portion of the image that belongs to said skin color class, according to said first global parameter (300), to obtain corrected pixels (100'); and a processing switch (4) for outputting said pixels or said corrected pixels (100') corresponding to a facial tone image portion according to said second global parameter (400). The device according to claim 1, characterized in that said pixel fuzzifier unit comprises: a contextual processing unit adapted to perform a spacial filtering on the pixels input to said pixel fuzzifier unit; a conversion unit connected downstream to said contextual processing unit and adapted to perform a transformation of each pixel from a RGB color space to a HSV color space; and a membership function evaluation unit connected to the output of said conversion unit and adapted to compute the membership value of each of said pixel with respect to said skin color class. The device according to claim 1, characterized in that said global parameter estimator comprises: an area estimation unit receiving in input said pixels and determining the area of said skin color class inside said digital image; and a coefficient estimation unit receiving in input the membership value of each of said pixels and adapted to compute, by means of fuzzy inference, correction coefficients for said pixels which belong to said skin color class. The device according to claim 2, characterized in that said processing unit receives in input said pixels, said first global parameter, and the memberships of each of said pixels. The device according to claim 4, characterized in that said processing unit comprises a conversion unit connected to a correction unit which is in turn connected to a back-conversion unit cascade connected to a soft-switch unit. The device according to claim 5, characterized in that said conversion unit receives in input the pixels of the digital image and is the same as the conversion unit of the pixel fuzzifier means. The device according to claim 6, characterized in that said correction unit receives in input the pixels color space-converted by said conversion unit and said second global parameter computed by the global parameter estimator and outputs corrected pixel which are then input to said back-conversion unit. The device according to claim 7, characterized in that said softswitch unit receives in input the output of said back-conversion unit, said pixels and the membership values for each of said pixels, said soft-switch unit performing a weighted average to output furtherly corrected pixels which are then input to said processing switch unit. The device according to claim 8, characterized in that said processing switch unit comprises a selector which receives in input said pixels, said first global parameter and the output of said soft-switch unit, to output said pixels or said furtherlv corrected pixels. A method for color correcting, by means of fuzzy logic, a facial tone image portion of a digital video image composed by a sequence of correlated frames, characterized in that it comprises the steps of: defining three fuzzy sets to be used to identify a skin color class of a facial tone image portion of a digital video signal; examining the image to determine if it is a facial tone image; in case of positive response, carrying out a color correction of the pixels of the facial tone image portion; and outputting a corrected facial tone image portion. The method according to claim 10, characterized in that the step of examining the image comprises fuzzifying the pixels belonging to the video signal image to determine the membership of each pixel to the skin color class. The method according to claim 10, further comprising, after the step of determining if the image is a facial tone image, the step of dividing said facial tone image in fuzzy subregions and for each subregion calculating the mean saturation and the mean value. The method according to claim 12, characterized in that it comprises the step of computing parameters for correction of the pixels belonging to said facial tone image, by means of said mean saturation and mean value and further by means of prototypes of skin saturation and skin value. The method according to claim 11, characterized in that said fuzzifying step comprises the steps of: spatially filtering the video digital signal; converting the pixel representation of the video digital signal from RGB color space representation to HSV color space representation; and determining membership value of each pixel of the image to the skin color class. The method according to claim 13, characterized in that the step of computing parameters for correction of the pixels belonging to said facial tone image comprises the steps of: estimating the area of the skin color class inside the image; and computing, by means of fuzzy inference, coefficients for the correction of the pixel of the facial tone image. The method according to claim 15, characterized in that the area of the skin color class is evaluated on the basis of the percentage of pixels belonging to the class. The method according to claim 15, characterized in that the coefficients for correction are computed by using fuzzy inference. The method according to claim 15, characterized in that the step of correcting the pixels of said facial tone image comprises the steps of: adding the coefficients to the coordinates of pixels of the facial tone image, the sign of said coefficients depending from predetermined fuzzy rules; and back-converting the corrected pixels from HSV color space representation to RGB color space representation. The method according to claim 18, characterized in that the step of correcting the pixels of the facial tone image further comprises the steps of: making, for each pixel of the facial tone image, a weighted average of the pixel, of the corrected pixel and of the membership value to the skin class. The method according to claim 19, characterized in that it further comprises the steps of: determining if the skin color class has an area larger than a predetermined threshold; in case of positive response, outputting the corrected pixels; and in case of negative response, outputting the pixels without any correction.

Inventors: COLLA FEDERICA, MANCUSO MASSIMO, POLUZZI RINALDO, COLLA, FEDERICA, MANCUSO, MASSIMO, POLUZZI, RINALDO
Applicants: ST MICROELECTRONICS SRL, STMICROELECTRONICS S.R.L.
Application year: 1997
Main classification: G06T1
IPC codes: H04N9, G06T5, G06T7, G03B27