Keywords

1 Introduction

Image segmentation consists of partitioning an entire image into different regions, which are similar in some predefined manner [1,2,3, 24]. Segmentation is an important feature of human visual perception which manifests itself, spontaneously and naturally. It is an important and difficult task in image analysis and processing. All subsequent steps, such as object recognition depend on the quality of segmentation [1,2,3,4, 24].

Color is an effective and robust visual feature to differentiate objects in an image. It is an important source of information in the segmentation process and may in many cases be used as a unique feature to segment objects of interest [1,2,3, 24].

Images with subtle changes of saturation are common in nature: The fading edges of clouds in the blue sky, changes of water vapor or mist on colored backgrounds; on aerial or satellite photographs of the seas, oceans, forests, deserts, etc. The colors of objects change its saturation due to the presence of some form of water steam in the middle.

Proper selection of the color space for color image processing is a very important aspect to be taken into account [2, 6, 8,9,10]. Several recent works [8, 16,17,18, 20, 21] use CIE L*a*b* or L*u*v* color spaces, which have some supposed advantages, such as the separation of lightness information (L*), as well as handling the chromatic color similarity as the Euclidean distance between the independent channels a*b* (or u*v*). These representations have the disadvantage that when managing the information of saturation and hue jointly in a*b* (or u*v*) channels, it is difficult to predict whether the similarity is due to some/one of these variables.

A comparative study [16] of several perceptually uniform color spaces (specifically: L*a*b*, L*u *v* and RLab) is presented in order to establish which color space is better for the segmentation of natural images. Only color information was used for comparative testing and excluded others. They conclude that with the color space L*u*v* the best results was obtained in both average discrimination capabilities and speed of processing.

In this paper we present a study of the behavior of the CIE L*a*b* color space to detect saturation variations during color image segmentation. For comparison purposes, we present the results using the Euclidean metric of the RGB channels and a recently published method [1, 5] using an improved color HSI space that keeps concordance with human color perception whilst eliminating known discontinuities of the classic HSI color space, and an adaptive color similarity function defined in that color space.

To carry out our study, synthetic color images with their associated ground truth were generated. The synthetic images were designed to evaluate the efficiency of achieved color information from given segmentation algorithms [11,12,13,14,15]. By the use and analysis of receiver operating characteristic (ROC) graphs [23] we obtained some proper characteristics of the segmentation methods under study.

The rest of the paper is organized as follows: In Sect. 2, we present the design methodology to generate synthetic images and benchmark. In Sect. 3, the results obtained with low and high saturated color images and their discussion are presented. Finally, in Sect. 4 the conclusions are given.

2 Design and Generation of Synthetic Images for Benchmark Testing

In this work we used the concepts and design considerations presented in Zhang and Gerbrands [14] and in [11,12,13, 15]. We created synthetic images with figure and background in color and selected a flower shaped image as the basic object to create our base test image (Fig. 1). For the CIE L*a*b* comparative tests were performed in a set of low and high saturated images with two different classification methods implemented in the L*a*b* color space [7, 20, 22]: (1) Using the minimum Euclidean distance of the *a and *b channels rejecting L* (as implemented by Matlab [7]), and (2) Using a probabilistic approach on the a* and b* channels [19, 20]. The L* value is excluded from the calculations with the intention of making them immune to changes in lighting. If L* would be used in the calculations of the distances, then additional errors would appear due to the shadows since shadows represent changes in luminance not in color.

Fig. 1.
figure 1

Flower-shaped ground truth

The manner in which the tests were implemented is as follows: in the case of the minimum Euclidean distance of the a* and b* channels in the L*a*b* color space, the RGB image and the pixel samples (of figure and background) were previously transformed to the L*a* b* color space, discarding in all cases the lightness L* in order to calculate the Euclidean distance on the a* b* channels (color information) independently of the illumination.

Then, the centroids (average of the values a* and b* of the pixel samples) representing the colors of the figure and the background in the color space L*a*b* were calculated for each sample. The Euclidean distance from the centroid of each class to every pixel of the image is calculated to classify the pixels as figure or background according to the minimum distance. Details about this procedure can be consulted in [7]. Using the probabilistic approach, we also transformed the image and pixels samples (of figure and background) to the L*a*b* color space discarding in all cases the lightness L*. Then, the mean and standard deviation of the values a* and b* from the pixel samples are calculated. From this information, we approximated normal probability density function (PDF) of every pixel belongs to the object or background classes using Gaussians for every channel a* and b*. From this probability we calculated the likelihood [19]:

$$ P^{i}_{1/2} (x) = \frac{{p^{i}_{1} (F_{i} )}}{{p^{i}_{1} (F_{i} ) + p^{i}_{2} (F_{i} )}} $$
(1)

where \( P^{i}_{1/2} \)(x) is the likelihood [19] function of the pixel x belongs to the region 1 (figure region) with respect to the probabilities of \( p^{i}_{1} \) (figure) and \( p^{i}_{2} \) (background) for a given channel Fi, which can be a* or b* in this case. Similarly we calculate \( P^{i}_{2/1} \)(x). To integrate the likelihood information of the two channels a* and b*, we multiplied the likelihood function of each channel:

$$ P_{1/2} (x) = P^{1}_{1/2} (x)*P^{2}_{1/2} (x) $$
(2)

Similarly we calculated \( P_{2/1} \)(x). Classification comes after obtaining the maximum between them and assign accordingly.

Segmentation tests were performed using the minimum Euclidean distance in RGB color space as reference. For comparison purposes, the segmentation results are shown in Figs. 6 and 10 as every third row of each color and in graphs shown in Figs. 8 (left) and 10 (left).

In the recently published method [1, 5] the following steps were performed:

  1. 1.

    Samples of both background and figure were taken, from which centroid and standard color dispersion was calculated.

  2. 2.

    The 24-bit RGB image (true color) was transformed to the modified HSI color space [1, 5].

  3. 3.

    For each pixel, the adaptive color similarity function [1, 5] to the centroids of figure and background was calculated creating two color similarity images (CSI).

  4. 4.

    Each pixel of the RGB image was classified by calculating the maximum value for each pixel position between the CSI images of the figure and that of the background.

This segmentation method can also be used directly in grayscale images without making any changes, achieving good results [1, 5]. On the contrary, the other tested methods that use the L*a*b* color space need to include the lightness L* to perform the segmentation of this type of images, since a* and b* values remain unchanged in the center of a*b* plane and would be blind to such images. To decide when the lightness L* must be considered in calculating the color distance is an additional task of the methods implemented in that space, contrary, the method presented in [1, 5] does it automatically when calculating the color similarity function using intensity distance as input.

The base shape of the synthetic test image was created with the following features:

  • Concave and convex sections to make better the representation of real images, such as natural flowers.

  • Extreme omnidirectional curvature in the entire image to hinder obtaining the edges applying mask edge detectors.

  • The object was centered in the image.

The resulting flower-shaped object in the image is considered as the object of interest and the ground truth (GT) in all subsequent tests (Fig. 1).

In addition to this object of interest, some features were imposed in order to hinder its color-based segmentation:

  • Low saturation contrast. The contrast between the object and the background in all images was only due to saturation and very low for an observer, including some in which at a glance one cannot see the difference (e.g. Flower_5 in Fig. 3). The saturation contrast in low saturated test images was 0.05 and in the high saturated test images was 0.1.

The difference between the color characteristics of the object of interest and the background is called Delta by us and occurs in this study in saturation for each color of study. The tests were performed in color quadrants 0, 60, 120, 180, 240 and 300° and in low and high saturated images in two groups corresponding to the images flower_A, flower_B … flower_F (Fig. 2) for low saturated images (with saturation = 0.1 and intensity = 1) and flower_Ah, flower_Bh … flower_Fh (Fig. 3) for high saturated images (with saturation = 0.9 and intensity = 0.9).

Fig. 2.
figure 2

Testing images with low saturation with delta in saturation

Fig. 3.
figure 3

Testing images with high saturation with delta in saturation

  • Blurred edges with an average filter. A sliding mean filter of size 3 × 3 pixels was applied to the whole image to blur the corners and to make detection of the object more difficult; such blurring was done to each of the RGB channels before the introduction of Gaussian noise.

  • Introduction of Gaussian noise with SNR value = 5. The noise was applied to each of the RGB channels individually, and later we assembled the channels to create the noisy RGB color image.

Samples of pixels corresponding to the figure object were obtained by two squares of 2 × 2 starting at the pixel (84, 84) and (150, 150). Samples for background pixels were obtained by two squares of 2 × 2 starting at pixel (15, 15) and (150, 180).

The images were generated in the sectors 0, 60, 120, 180, 240 and 300° in low and high saturation regions, to which we later applied a faded shadow.

A shadow fading was applied to all noisy blurred images with the light center in the fixed coordinates (150, 150) in images of 256 × 256 pixels. It was applied gradually with 10% increments at each step. Figure 4 shows in detail for Flower 0 in low saturation. Figure 5 shows for Flower_0h in high saturation.

Fig. 4.
figure 4

Example in color quadrants with a faded shadow applied at 0° with low saturation

Fig. 5.
figure 5

Example in color quadrants with a faded shadow applied at 0° with high saturation

3 Results and Discussion

In this section we show graphically the results, both in the low saturated regions (see Fig. 6) and in the high saturated regions (see Fig. 10) for two color quadrant (0° and 60°) incrementing the level of shadow fading, in 10% at each step. The first position means no shadow and position 11 means 100% shadow fading.

Fig. 6.
figure 6

Results of the color segmentation of low saturation images by the Euclidean metric of a* and b* parameters in the L*a*b* color space (first rows of each color), the probabilistic approach in a* and b* color channels (second rows of each color), the Euclidean metric of the RGB channels (third row of each color) and the method using the adaptive color similarity function (fourth row of each color), for two color quadrant (0° and 60°) with 10% increments of shadow fading at each step.

We also show a variation of receiver operating characteristic (ROC) graphs [23] to visualize the values of hit rates (True Positives or TP rate) versus error rates (False Positives or FP rate) at the increasing of the shadow fading (Figs. 7, 8, 9 and 11, 12, 13). We show the numerical results for all color quadrants (0°, 60°, 120°, 180°, 240° and 300°). For this purpose all the images had the same post-processing: elimination of areas smaller than 30 pixels and a morphological closing with a circular structuring element of radius equal to two pixels.

Fig. 7.
figure 7

Plot of true positives (TP) and false positives (FP) of the Euclidean distance of a* and b* (left) and the probabilistic approach on a* and b* (right) tested for low saturated images

Fig. 8.
figure 8

Plot of TP and FP of the Euclidean metric of the RGB channels (left) and of the adaptive color similarity function method (right) tested for low saturated images

Fig. 9.
figure 9

Details of TP (left) and FP (right) of the adaptive color similarity function method in low saturated images

3.1 Low Saturation Results

Here, we present the results for low saturation images with a different level of shadow fading comparing the Euclidean metric of a* and b* (every first row of each color), the probabilistic approach in a* and b* (every second row of each color), the Euclidean metric of the RGB channels (third row of every color) and the method using the adaptive color similarity function (fourth row of every color) included in Fig. 6 for two color quadrant (0° and 60°) with 10% of increment of the shadow fading at each step.

As is shown in the graphs of Fig. 7 and in coincidence with the visual analysis of the corresponding flower (Fig. 6 first and second rows), segmentation failures in the case of the Euclidean distance of a* and b* (see Fig. 7 left) and in the case of the probabilistic approach in the L*a*b* space (see Fig. 7 right) started around 50% of the faded shadow and continued increasing to levels of 80%–90% of false positives (errors rate) in all color quadrants (0°, 60°, 120°, 180°, 240° and 300°).

The segmentation using the Euclidean metric of the RGB color channels failed in a regular way starting the problems early in only 10% to 20% of the applied shadow fading showing a progressive increase of errors up to 30% (see Fig. 6 third row of each color and Fig. 8 left) in all color quadrants.

As it can be seen from the images corresponding to the results of the segmentation of the test images with low saturation (Fig. 6 fourth row of each color) and the corresponding graphs (Figs. 8 right and 9 left and right), the method using the adaptive color similarity function [1, 5] behaved correctly in all cases, always segmenting the object of interest with a high hit rate of true positives (TP) above 99.2% with a low error rate of less than 1% in all color quadrants (0°, 60°, 120°, 180°, 240° and 300°).

3.2 High Saturation Results

Here, we present the results for high saturated images with a different level of shadow fading comparing the Euclidean metric of a* and b* (every first row of each color), the probabilistic approach in a* and b* (every second row of each color), the Euclidean metric of the RGB channels (third row of every color) and the similarity function method (fourth row of every color). The results are shown in Fig. 10 for two color quadrant (0° and 60°) with 10% of increment of the shadow fading at each step.

Fig. 10.
figure 10

Results of the color segmentation achieved between the Euclidean metric of the a* and b* parameters in the L*a*b* color space (first rows of each color), the probabilistic approach (second rows of each color), the Euclidean metric of the RGB channels (third row of each color) and the similarity function method (fourth row of each color), for two color quadrant (0° and 60°) of highly saturated images with 10% increments of shadow fading at each step

As is shown in the graphs of Fig. 11 and in coincidence with the visual analysis of the corresponding flower (Fig. 10 first and second rows of each color), segmentation failures in the case of the Euclidean distance of a* and b* (see Fig. 11 left) and in the case of the probabilistic approach in the L*a*b* space (see Fig. 11 right) started around 50% of the faded shadow and continued increasing to levels of 80%–90% of false positives (errors rate) in all color quadrants (0°, 60°, 120°, 180°, 240° and 300°).

Fig. 11.
figure 11

Plot of TP and FP of the Euclidean metric of a* and b* (left) and the probabilistic approach on a* and b* (right) tested for high saturated images

The segmentation using the Euclidean metric of the RGB color channels failed in a regular way starting to have problems in 20% to 30% of the applied shadow fading showing a progressive increase of errors up to 30% (see Fig. 10 every third row of each color and Fig. 12 left).

Fig. 12.
figure 12

Plot of TP and FP of the Euclidean metric of the RGB channels (left) and of the adaptive color similarity function method (right) tested for high saturated images

As it can be seen from the images corresponding to the results of the segmentation of the test images with high saturation (Fig. 10 fourth row of each color) and the corresponding graphs (Fig. 12 right and Fig. 13 left and right), the method using the adaptive color similarity function [1, 5] behaved correctly in all color quadrants (0°, 60°, 120°, 180°, 240° and 300°), always segmenting the object of interest with a high hit rate (TP) above 99.5%, only one result had 99.3% of hit rate. In all color quadrants had a low error rate below 0.5%. Details can be seen in Fig. 13 left and right.

Fig. 13.
figure 13

Details of TP (left) and FP (right) of the adaptive color similarity function method in high saturated images

4 Conclusions

The results achieved show that the CIE L*a*b* color space is not adequate to distinguish subtle changes of color saturation under illumination variations. In some high saturation regions the CIE L*a*b* color space is not useful to distinguish saturation variations at all. It can be observed that the CIE L*a*b* has better performance than the RGB color space in low saturated regions but has a worse performance in most high saturated color regions. The segmentation algorithms using the CIE L*a*b* color space suffered errors in all cases at different levels of applied shadow.

The segmentation using the Euclidean metric of the RGB color channels failed in a regular way starting to have problems early at low levels of the applied shadow, showing a progressive increase of errors.

The method using the adaptive color similarity function performed well in low and high saturation color regions being practically immune to the increase of the shadow fading, with hit rates above 99% and errors rates below 1% in all cases of study. We have observed that the improvement in quality of this segmentation technique and its quick result is substantially significant.

It can be noticed that the non-consideration of the lightness parameter L* in calculating Euclidean distance and in the probabilistic approach in the CIE L*a*b color space did not made the methods immune to changes in lighting; so simple shadow can alter the quality of their results. This work is aimed to observe the performance of the CIE L*a*b* to detect subtle changes of saturation during color segmentation, and shows that it yields poor results and not equal for every color and level of saturation. Therefore all applications using that color space will have impoverished and unexpected results depending on the input images and illumination.