RGB Color Cube-Based Histogram Speciﬁcation for Hue-Preserving Color Image Enhancement

: A large number of color image enhancement methods are based on the methods for grayscale image enhancement in which the main interest is contrast enhancement. However, since colors usually have three attributes, including hue, saturation and intensity of more than only one attribute of grayscale values, the naive application of the methods for grayscale images to color images often results in unsatisfactory consequences. Conventional hue-preserving color image enhancement methods utilize histogram equalization (HE) for enhancing the contrast. However, they cannot always enhance the saturation simultaneously. In this paper, we propose a histogram specification (HS) method for enhancing the saturation in hue-preserving color image enhancement. The proposed method computes the target histogram for HS on the basis of the geometry of RGB (rad, green and blue) color space, whose shape is a cube with a unit side length. Therefore, the proposed method includes no parameters to be set by users. Experimental results show that the proposed method achieves higher color saturation than recent parameter-free methods for hue-preserving color image enhancement. As a result, the proposed method can be used for an alternative method of HE in hue-preserving color image enhancement.


Introduction
Color image enhancement is a challenging task in digital image processing with broad applications including human perception, machine vision applications, image restoration, image analysis, image compression, image understanding and pattern recognition [1], underwater image enhancement and image enhancement of low light scenes [2].Sharo and Raimond surveyed the existing color image enhancement methods such as histogram equalization (HE), fuzzy-based methods and other optimization techniques [3].Saleem and Razak also surveyed color image enhancement techniques using spatial filtering [4].Suganya et al. analyzed the performance of various enhancement techniques based on noise ratio, time delay and quality [5].
In color image enhancement, preserving the hue of an input image is frequently required to preserve the appearance of the objects in the image.Bisla surveyed hue-preserving color image enhancement techniques [6].Zhang et al. proposed a method for hue-preserving and saturation scaling color image enhancement using optimal linear transform [7].Aashima and Verma proposed a hue-preserving and gamut problem-free color image enhancement technique, and compared it with a discrete cosine transform-based method [8].Porwal et al. also proposed an algorithm for hue-preserving and gamut problem-free color image enhancement [9].Chien and Tseng proposed a set of formulae for the color transformation between RGB (red, green and blue) and exact HSI (hue, saturation and intensity), and used it for color image enhancement [10].Gorai and Ghosh considered image enhancement as an optimization problem and solved it using particle swarm optimization [11].Taguchi reviewed color systems and color image enhancement methods, and introduced an improved HSI color space [12].Menotti et al. proposed two fast hue-preserving HE methods based on 1D and 2D histograms of RGB color space for color image contrast enhancement [13].Pierre et al. [14] introduced a variational model for the enhancement of color images, and compared their method with the state-of-the-art methods including Nikolova and Steidl's method [15], which is based on their strict ordering algorithm for exact HS [16].
Almost all of the above hue-preserving color image enhancement methods are based on the pioneering work of Naik and Murthy [17], where a scheme is proposed to avoid gamut problem arising during the process of enhancement of the intensity of color images using a general hue-preserving contrast enhancement function, in which HE is a typical example for intensity transformation.Han et al. also proposed the equivalent method from a viewpoint of 3D color HE [18].However, Naik and Murthy's method cannot increase the saturation of colors to be enhanced.To overcome this problem, Yang and Lee [19] proposed a modified hue-preserving gamut mapping method that outputs higher saturation than Naik and Murthy's method.Yang and Lee's method divides the range of luminance into three parts corresponding to dark, middle and bright colors, and handles the input colors in different manners, that is, for dark and bright colors, their saturation is enhanced first, and then, Naik and Murthy's method is applied to the saturation-enhanced colors.On the other hand, for the remaining colors with middle luminance, Naik and Murthy's method is applied to the original colors directly.Therefore, the saturation of the middle luminance colors cannot be improved as well as Naik and Murthy's method.
In this paper, we propose a parameter-free HS method for hue-preserving color image enhancement based on the geometry of RGB color space.The proposed method can improve the color saturation in both Naik and Murthy's and Yang and Lee's methods.Experimental results show that the proposed HS method applied to Naik and Murthy's and Yang and Lee's methods improves the color saturation compared with the conventional Naik and Murthy's and Yang and Lee's methods using HE.
The rest of this paper is organized as follows: Section 2 first defines the saturation of a color, and then summarizes Naik and Murthy's and Yang and Lee's methods.Section 3 describes the detailed procedures of HS for color image enhancement, where HE is also summarized, and then RGB color cube-based HS method is proposed.Section 4 shows experimental results of hue-preserving color image enhancement.Finally, Section 5 discusses the results and the utility of the proposed method.

Hue-Preserving Color Image Enhancement
In this section, we briefly summarize previous hue-preserving color image enhancement methods proposed by Naik and Murthy [17] and Yang and Lee [19] after the description of color saturation.
Let p = [r, g, b] T be a point in RGB color space or an RGB color vector, where r, g and b denote red, green and blue values, respectively, and satisfy 0 ≤ r ≤ 1, 0 ≤ g ≤ 1 and 0 ≤ b ≤ 1, and the superscript T denotes the matrix transpose.Then, the intensity of p is given by l = r + g + b [17] satisfying l ∈ [0, 3], and the saturation of p is the perpendicular distance from the intensity axis to p [20] as follows: where 1 = [1, 1, 1] T , I is the 3 × 3 identity matrix, and • denotes the Euclidean norm.
Lemma 1.The saturation S(p) of p given by (1) has the following properties: where β is a positive number, and The proof of Lemma 1 is given in Appendix A.

Naik and Murthy's Method
Let α(l) = f (l)/l for l > 0, where f (l) is a function of l for transforming the original intensity into the modified one in the same range as its domain, i.e., f (l) ∈ [0, 3].Then, Naik and Murthy considered a hue-preserving transformation of the form where p = [r , g , b ] T denotes the transformed color vector of p.The value of α(l) will be greater than 1 when f (l) > l.In such a case, the element value of p may exceed 1 and thus result in a gamut problem.To overcome this problem, Naik and Murthy proposed a gamut problem-free procedure as follows: Naik and Murthy's method 2. Case (ii) If α(l) > 1, then perform the following procedure: (1) Transform the RGB color vector p to CMY (cyan, magenta and yellow) color vector (4) Compute q = ᾱ(l)q.
(5) Transform the CMY color vector q to RGB color vector p = 1 − q .
Note that, in Step (3) in Case (ii), we cannot compute ᾱ( l) when l = 3 because it results in division by zero.To avoid such difficulties, we set that p = 1 if l = 3, and p = 0 = [0, 0, 0] T if l = 0. We find that Case (ii) can be concisely written as follows: Additionally, it has been proved that Naik and Murthy's method does not increase the saturation, that is, S(p ) ≤ S(p) [21].

Yang and Lee's Method
Yang and Lee also pointed out that the color saturation of the resulting images by Naik and Murthy's method is low, and proposed a hue-preserving gamut mapping method, the resulting images of which show higher saturation than that of Naik and Murthy's.
Although Yang and Lee defined the luminance of p as n = (r + g + b)/3 = l/3 instead of the intensity l to describe algorithms in their paper [19], we would like to use l rather than n in this paper consistently.Using l, we can describe Yang and Lee's method as follows: Yang and Lee's method 1. Case (I) If l ≤ 1, then compute p = p/l, whose intensity is 1.Apply Naik and Murthy's method to p as follows: (1) Case ( 2. Case (II) If 1 < l ≤ 2, then apply Naik and Murthy's method to p as follows: ( 3. Case (III) If l > 2, then transform p into the CMY color vector q = 1 − p, and then lower the intensity of q to 2 as q = q/(3 − l) to have the RGB color vector p = 1 − q.Apply Naik and Murthy's method to p as follows: ( We have the following lemma: Lemma 2. The saturation given by Yang and Lee's method is greater than or equal to that given by Naik and Murthy's method, that is, S(p ) ≥ S(p ).
The proof of Lemma 2 is given in Appendix A.

Histogram Specification for Color Image Enhancement
Let P = [p ij ] be a digital color image, where T denotes the RGB color vector at the position (i, j) of a pixel in P for i = 1, 2, . . ., m and j = 1, 2, . . ., n, where m and n denote the numbers of pixels in the vertical and horizontal directions in P, respectively.Suppose that P is a 24-bit true color image.Then, each element of p ij is an integer between 0 and 255, i.e., r ij , g ij , b ij ∈ {0, 1, . . ., 255}, and the intensity of p ij is given by lij = r ij + g ij + b ij ∈ {0, 1, . . ., L}, where L = 255 × 3 = 765.

Histogram Equalization
Let h = [h 0 , h 1 , . . ., h L ] be the histogram of the intensity lij of p ij in P.Then, the lth element of h is given by h , where δ l, lij denotes the Kronecker delta; δ l, lij = 1 if l = lij and 0, otherwise.Let H = [H 0 , H 1 , . . ., H L ] be the cumulative histogram of h, where the lth element of H is given by H l = ∑ l k=0 h k .Then, the intensity transformation function f (l) for HE is given by where 'round( )' operator rounds a given argument toward the nearest integer, H L = ∑ L k=0 h k = mn, and l = round(Ll/3) for l ∈ [0, 3].The histogram-equalized intensity image of P is given by where

Histogram Specification
Let h = [ h0 , h1 , . . ., hL ] be a target histogram into which we want to transform the original histogram of intensity, and let H = [ H0 , H1 , . . . ,HL ] be the cumulative histogram of h, where the lth element of H is given by Hl = ∑ l k=0 hk .Then, the intensity transformation function f (l) for HS is given by where HL = ∑ L k=0 hk , and l = round(Ll/3) for l ∈ [0, 3].The histogram-specified intensity image of P is given by P S = [p S ij ] where

RGB Color Cube-Based Histogram Specification
In this subsection, we propose a parameter-free HS method named RGB color-cube based HS.As described in Section 2, the saturation of a color in RGB color space is defined as the perpendicular distance between the intensity axis and a point corresponding to the color.The locus of the perpendicular line around the intensity axis forms an equiintensity plane.Let us consider the cross section of the equiintensity plane and RGB color cube as shown in Figure 1, where the cross sections are painted in light blue, and Figure 1a-c show three cases of the value of the intensity l found in the equation of the plane, 1 T p = 1 l, that is, 0 ≤ l ≤ 1, 1 ≤ l ≤ 2 and 2 ≤ l ≤ 3, respectively.In these figures, the triangles drawn by red broken and solid lines denote the cross sections of l = 1 and l = 2, respectively.
The area of the cross section indicates the variety of saturation for a given intensity l.Let a(l) be the area of the cross section for an intensity l.Then, we have the following analytic form of a(l): which is continuous at l = 1 and l = 2, that is, Additionally, the derivative function of a(l) is given by which is also continuous at l = 1 and l = 2, that is,

The integral of a(l) is given by
which is also continuous at l = 1 and l = 2, that is, 2 shows the graphs of a(l) and A(l), where the vertical and horizontal axes denote the function value of a(l) or A(l) and the intensity l, respectively, and the blue and green lines denote the functions a(l) and A(l), respectively.We propose to use a(l) and A(l) as the substitution of the target histogram and its cumulative one in HS, respectively.The detailed procedure is as follows.
Let hC = [ hC 0 , hC 1 , . . ., hC L ] be the target histogram for the proposed RGB color cube-based HS.Then, the lth element hl of hC is given by for l = 0, 1, . . . ,L. By means of the cumulation of hC , we have the cumulative histogram HC .
In another way, since we have the analytic form of the integral of a(l) as A(l), we can also compute HC = [ HC 0 , HC 1 , . . ., HC L ] from A(l) directly as follows: for l = 0, 1, . . ., L. Then, the intensity transformation function f (l) for RGB color cube-based HS is given by where HC L = A(3) = √ 3, and l = round(Ll/3) for l ∈ [0, 3].The histogram-specified intensity image of P is given by The above intensity transformation functions, f E (l), f S (l) and f C (l), can be used instead of f (l) in Naik and Murthy's and Yang and Lee's methods.

Conditions for Saturation Improvement
The above RGB color cube-based HS can be used in both Naik and Murthy's and Yang and Lee's methods as well as the conventional HE.In this subsection, we summarize the conditions for improving color saturation by the proposed HS compared with HE in the two methods.

Naik and Murthy's Method
Let α E (l) = f E (l)/l, α C (l) = f C (l)/l, and p C be the enhanced color of p by Naik and Murthy's method with the proposed HS.Then, we have S(p C ) ≥ S(p ) under the following conditions: (16)

Yang and Lee's Method
Let p C be the enhanced color of p by Yang and Lee's method with the proposed HS.Then, we have S(p C ) ≥ S(p ) under the following conditions for three cases of l: If l ≤ 1 (Case I in Yang and Lee's method), then we have the following conditions: If 1 < l ≤ 2 (Case II in Yang and Lee's method), then we have the same conditions as Equation ( 16) because Yang and Lee's method coincides with Naik and Murthy's method.
If l > 2 (Case III in Yang and Lee's method), then we have the following conditions:

Experimental Results
In this section, we show the experimental results of hue-preserving color image enhancement, and demonstrate that the proposed method improve the color saturation in comparison with Naik and Murthy's and Yang and Lee's methods using HE.
Figure 3 shows input and output images for hue-preserving color image enhancement, where the first top row shows the original input images, and the second to fifth rows show the corresponding output images.The original images in the top row are collected from the Standard Image Data-BAse (SIDBA) [22].The second row shows the results by Naik and Murthy's method, which uses HE for intensity transformation to enhance the contrast.However, the color saturation has faded in all images.As a result, the output images become close to their contrast-enhanced grayscale images.Moreover, we can see that the 2nd (Airplane) and the 6th (Girl) images become noisy by contrast overenhancement caused by HE.The third row shows the results of the proposed HS used in Naik and Murthy's method instead of HE, where the color saturation is recovered and the noise is suppressed compared with the second row.The fourth row shows the results of Yang and Lee's method with HE, where the 4th (Couple) and 6th (Girl) images have improved saturation and are more colorful than the second row of Naik and Murthy's method.However, the other images are similar to that of Naik and Murthy's method.The fifth row shows the results of the proposed HS used in Yang and Lee's method instead of HE, where the saturation is improved compared with the third and fourth rows.Figure 4 shows the saturation images whose pixel values are given by the saturation values S(p) in Equation ( 1).The order of the images are the same as that of Figure 3.The images in the second row are not brighter than that in the first row, which demonstrates visually that Naik and Murthy's method cannot increase the saturation from the original images.The third row shows the saturation images by Naik and Murthy's method with the proposed HS, which can improve the saturation-for example, we can see brighter regions in 7th (Lenna) to 10th (Parrots) images than the corresponding images in the second row.The fourth row shows the saturation images by Yang and Lee's method with HE, which achieves higher saturation than Naik and Murthy's method in the second row.The fifth row shows the saturation images by Yang and Lee's method with the proposed HS, which further increases the saturation compared with the fourth row.
Figure 5 shows the difference maps between the enhanced and original saturation images.These maps are generated by the following procedure: let p and p enh be the corresponding pixels of an original color image and its enhanced one, respectively.Then, we compute the difference of their saturations as d = S(p enh ) − S(p), and set the pixel color in the difference map by (1/2) + [d, d, 0] T if d ≥ 0, and (1/2) − [0, d, d] T otherwise.That is, cyan and green in the difference map mean a decrease and increase in saturation, respectively, and gray (1/2) means neutral.
The top row in Figure 5 shows the difference maps between Naik and Murthy's results with HE and the original images, where we can see a number of deep cyan regions, which mean a decrease in saturation from the original images.On the other hand, the second row shows the results by Naik Murthy's method with the proposed HS, where the cyan regions are diluted compared with the top row.The third row shows the results by Yang and Lee's method with HE, which gives similar results to Naik and Murthy's method in the top row except for the 4th (Couple) and 6th (Girl) images, in which we can see the yellow regions that mean the increase in saturation.The bottom row shows the results by Yang and Lee's method with the proposed HS, where the cyan regions are diluted as well as the second row, and yellow regions are made deeper and broader than the third row.The total mean saturation is summarized in Table 1, where twelve mean values of each color bar are averaged to get the values in the table.Naik and Murthy's method denoted by Naik + HE in the table decreases the total mean saturation from the value of the original images.The proposed method (Naik + Proposed HS) increases the total mean saturation from Naik + HE.Yang and Lee's method (Yang + HE) achieves greater value than Naik + HE, which demonstrates the claim in Lemma 2, and the proposed method (Yang + Proposed HS) also improves it.Figure 7 shows the results on the INRIA Holidays dataset [23,24], where the top row shows the original images, and the second to fifth rows show the results by Naik and Murthy's method with HE and the proposed HS, and Yang and Lee's method with HE and the proposed HS, respectively.The number under each image denotes the mean saturation value.The proposed HS improves the mean saturation of almost all examples except for an image with the mean saturation value 7.59, which is lower than 8.32 given by Naik and Murthy's method with HE.

Discussion
In the above experimental results, we have compared four hue-preserving color image enhancement methods: Naik + HE, Naik + Proposed HS, Yang + HE and Yang + Proposed HS.First, we confirmed the fact that Naik and Murthy's method does not increase the saturation of original colors experimentally.Next, we also experimentally confirmed the claim in Lemma 2, that is, Yang and Lee's method can improve the saturation compared with Naik and Murthy's method.Moreover, we demonstrated that the proposed HS method can improve the saturation compared with the conventional HE method used in both Naik and Murthy's and Yang and Lee's methods.
The target histogram for the proposed HS method is derived from the geometric shape of RGB color space, that is, a cube with a side length of 1, and has an analytic expression that can be integrated to obtain the cumulative target histogram used in the proposed HS.As a result, the proposed HS method has no additional assumptions or parameters.Therefore, there is no need for users to be bothered with any parameter settings.Additionally, the proposed HS method can suppress the contrast overenhancement that frequently occurs when HE is used.
Consequently, the proposed HS method can be used for an alternative method of HE because it is a parameter-free method as well as HE, and can enhance the color saturation compared with the conventional hue-preserving color image enhancement methods, while it can suppress the contrast overenhancement that occurs in HE frequently.

Figure 2 .
Figure 2. Area of cross section of RGB color cube and equiintensity plane, a(l), and its integral, A(l).

Figure 3 .
Figure 3. Results of hue-preserving color image enhancement.
Original imagesNaik and Murthy's method with HE Naik and Murthy's method with the proposed HS Yang and Lee's method with HE Yang and Lee's method with the proposed HS

Figure 6
Figure6shows the mean saturation value per pixel for each image in Figure4, where the vertical and horizontal axes denote the mean saturation and the names of images, respectively.Compared with the original images denoted by cyan bars, the Naik and Murthy's results denoted by light green have decreased mean saturation.The proposed HS improves the mean saturation as shown by the yellow bars; however, the improvement is limited to the values of the original images by the fact that Naik and Murthy's method does not increase the saturation[21].Yang and Lee's results denoted by the

Figure 7 .
Figure 7. Results on the INRIA (Institut National de Recherche en Informatique et en Automatique) dataset with the mean saturation values.

Table 1 .
Total mean saturation.In this table, 'Original' means the original images, 'Naik+HE' means Naik and Murthy's method with HE, 'Naik+Proposed HS' means Naik and Murthy's method with the proposed HS, 'Yang+HE' means Yang and Lee's method with HE, and 'Yang+Proposed HS' means Yang and Lee's method with the proposed HS.