Color Constancy using Effective Candidate Images

: In this study, we propose a novel method for color constancy based on image similarity. Discuss how to improve illumination estimation techniques and take extracted effective information from the regions of the images into account. Design a strategy to select effective candidate images from image classes which present different content and are usually taken under different illumination conditions. The method has been tested on a suitable and widely used dataset. Experimental results clearly demonstrate that the proposed method is more effective than the former statistics algorithms base on local spaces.


INTRODUCTION
The color of an object recorded by electronic devices is determined by the color of light source.Differences in illumination cause the measurements of object colors to be biased towards the light source's color, which will bring us a lot of troubles in computer vision applications, such as object recognition as well as a variety of methods relying on color images.Fortunately, humans have the ability of color constancy and perceive the same color of an object despite large differences in illumination.Computational color constancy aims to estimate the actual color in an acquired scene disregarding its illuminant since the similar color constancy capability is necessary for various computer vision tasks.
A larger number of various algorithms have been proposed to solve the problem of color constancy.According to their assumptions and techniques, color constancy algorithms are mainly divided into two categories: unsupervised approaches and supervised ones.The former approaches estimate illumination using color components of the image itself.Max-RGB estimates the scene illumination based on the assumption that the maximum responses of the different color channels represent the color of illumination.Grey world algorithm estimates the illumination by computing the average color of global space.Shades of grey algorithm integrate Max-RGB and Grey world algorithms into a uniform framework using Minkowski norm.Edge-based algorithm is based on the assumption that the illumination is non-uniform.Grey surface identification estimates the illumination based on the average color of those potential grey surfaces (Xiong et al., 2007).Gijsenji and Gevers (2007) proposed a method based on local image features using subsets of pixels in which only relevant pixels are used the later approaches estimate illumination based on color components of the training images.Color constancy based on Bayesian uses Maximum Local Mass (MLM) estimator for color constancy in which flat matte surfaces is uniformly illuminated.Neural network method extracts the relationship between the scene and chromaticity of scene illumination and then corrects the image colors to a standard illumination (Cardei et al., 2002).Support Vector Regression method achieves better results based on the association between color histograms and illumination chromaticity (Xiong and Funt, 2006).Recently, Thin-Plate Spline (TPS) method, which is based on a weighted combination of the entire set of training data, estimates the illumination using local average color as the feature (Shi et al., 2011).Other interesting solutions include computing color constancy using Weibull distribution.
A complete review and comparison among these algorithms are shown above.Although unsupervised approaches are still widely used in real applications due to low computational cost and simplicity, supervised methods are superior to the others.In particular, illumination estimation based on local space color is attracting more attention because it can bring more accurate performance without adding more complexity.However, it depends on effective local feature extraction, function definition of image similarity and effective candidate images' selection.In this study, effective features are extracted in every region of the image for color constancy; effective candidate images are selected for illumination estimation.We call the method ECI as color constancy computed by effective candidate images.

COMPUTATIONAL COLOR CONSTANCY
According to the Lambert an model, an image acquired by a digital camera can be seen as a function f(x, y), which mainly depends on three physical factors: color distribution of the light source e(λ), with the pixel's co-ordinates(x, y), the surface spectral reflectance s(x, y, λ) and the camera sensitivity c(λ).f (x, y) can be described as: ( , ) ( ) ( , , ) ( ) where, λ is wavelength and w represents the visible spectrum.Since the three camera sensitivities are usually respectively sensitive to the low, medium and high wavelengths, the three-component vector of sensor The goal of color constancy is to estimate the color e: ( ) ( ) It is known that the problem addressed is actually ill-posed as its solution lack uniqueness and stability.To cope with this problem, different solutions usually are based on some assumptions about statistical properties of the expected illuminants and the object reflectance in the scene.In this study, an improving statistics-based color constancy algorithm, which extracts effective features and selects effective candidate images for estimating illumination, is proposed based on image similarity.

COLOR CONSTANCY USING EFFECTIVE CANDIDATE IMAGES
Based on the image similarity assumption, the color constancy computation process includes three steps: firstly, we must get the effective color features to compute the similar degree between images.Secondly, similarity function must be defined.Thirdly, suppose that the illumination of an image P is unknown and being estimated.The N images, which are most similar to the P, can be found out from the image database.It is very important to select M effective canonical images from the N images for estimating illumination.

Features extraction:
The main idea is that certain pixels of the image do not contribute to a robust estimate of the illumination.Even worse, some pixels may harm the illumination estimation.Therefore, instead of using the entire image, we advocate segmenting image and selecting effective pixels as color features prior to estimate illumination.In this study, the segmentation method is proposed by A. Gijseniji based on a grid: the image is divided into m×n regions (an 8×8 grid is used) (Gijsenji and Gevers, 2007).
After that, for each image region, median pixel's value is extracted as the median color feature, which represents average chromaticity distribution of the local spaces: where, r med-i and g med-i are median chromaticity values of the region R i .According to Grey world assumption, the region's illumination can be estimated with the feature.However, it is not enough to estimate accurately.The maximum color feature, which represents the color of the illuminant, is extracted as follows: where, r max-i and g max-i are maximum chromaticity values of the region R i .According to Max-RGB assumption, the region's illumination can be estimated with the maximum chromaticity values in different color channels.
The most obvious advantage of the chromaticity features is that it fully considered effective local features in different assumptions.On the one hand, instead of using the entire image, it uses effective local pixels which eliminate estimation biased caused by some pixels.On the other hand, different color features based on corresponding assumptions improve the accuracy of the estimation.Figure 1 shows an example of a basic segmentation into 8×8 grid.

Definition of the similarity:
Based on the features extracted above, similarity function is introduced in this section.Similarity defines the similar degree, which indicates the similar illumination between two images.Because not all the pixels are helpful for estimation illumination, we advocate extracting effective information; because there may have a lot of light sources, we advocate segmenting the image and extracting features in every region.In order to improve the accuracy of the algorithm, we extract features according to different assumptions.In addition, the angle between features is also very important.Consequently, the similarity function is defined as follows: ( , ) where, E dis represents the chromaticity (r, g) distance between the features; A angular represents the angle between two 3-dimensonal chromaticity vectors (r, g, b).E med (R i , R j ) and E max (R i , R j ) respectively represent the distance of the median color feature(r med-i , g med-i ) and maximum color feature (r max-i , g max-i )between region R i and R j , A med (R i , R j ) and A max (R i , R j ) are angles of the features.D (R i , R j ) represents similarity between the region R i and R j .λ k is the weight value.Because the maximum feature, which can represent color of the illuminant, is more important than the average feature and the vector's direction is much more important than its intensity.So in the experiment, we make λ 4 largest in the λ k , that is, λ 4 ≥λ 3 ≥λ 1 and λ 4 ≥λ 2 ≥λ 1 .The similarity is defined as follow: where, Sim (P, Q) is similarity between the image P and Q, m×n represents the number of regions, D k (P, Q) represents similarity between the kth regions in image P and Q.The more similar are the two images, the smaller are the distances between features, the closer are the directions of the two vectors and the smaller is Sim (P, Q).

Illumination estimation using candidate images:
Most of the existing statistics algorithms use all the similar images, but there still exist several points to improve.On the one hand, they just use a specific color feature based on corresponding assumption, it may be not the best choice for every image.On the other hand, their algorithms are based on the assumption that all the images are useful if they belong to the same category or they are similar to the image.Obviously, it doesn't make sense under any conditions and quite a lot of training images are needed.Consequently, a new algorithm using effective candidate images based on image similarity is proposed in this study.In this algorithm, effective color features are obtained according to different assumptions to get rid of bias.Furthermore, the effective candidate images are chosen for color constancy.
Suppose that the illumination of an image P is unknown and being estimated.The effective candidate images selection process is described as follows:: For each image in the learning data set (Q): Step 1 : All the images are divided into m×n regions.
The color features are extracted according to methods mentioned above Eq.(3 and 4).
Step 2 : According to Eq. (5, 6 and 7), compute distances and angles of region's features with P and the ith region's similarity D i,j (P i , Q i,j ) between P and Q j Eq. (8 and 9).
Step 3 : According to Eq.10, compute the image similarity (S j ) and choose N images, whose similar degree is less than £.
Step 4 : First of all, select the image (H 1 ) from N images, whose D min-1 (P 1 , Q 1,j ) is the smallest in the first region and put H 1 into effective candidate image set (H).
Step 5: Select the images in other regions according to methods mentioned above(Step 4) and sort the m×n regions' similarity from low to high, the similarities are denoted as D min-1 , D min-2 …D min- m×n .m×n image denoted as H 1 , H 2 …H N .
We suppose that there has M (m×n) images in the effective candidate image set (H), the smallest where, D min-k represents the kth region similarity and D min-k <D min-(k+1) .w k is the weight value.The ˆP e = P e / P e is the normalized the illumination vector of the image with unknown illumination.The smaller is D min-k , the closer is similar degree between the two regions and the more similar is the illumination between two images, so w k should be bigger.

EXPERIMENTS
In this section, the proposed color constancy algorithm is tested on a large data set calibrated by Barnard, which includes more than 321 images captured using Sony DXC-930.We implement the algorithm in MATLAB and conduct experiments to compare its performance with other illumination estimations.
Error measure: Several error measures are used to evaluate performance.The distance between the actual illumination chromaticity (r a , g a ) and the estimated illumination (r c , g c ) is calculated as Eq.5.Given illumination chromaticity r and g, the other component can be obtained as b=1-r-g.The angular error between the measured actual illumination color and the estimated illumination is computed as Eq.6.Assuming there are N tested images, we will also report the root mean square, mean and median distance (angular).The RMS is defined in the standard way as: where, E represents the distance or the angular error to evaluate the error distribution different in the performance of two competing methods, the Wilcox on signed-rank is applied.The threshold for accepting or rejecting the null hypothesis is set to be 0.01.The parameters λ k in Eq. ( 9) are evaluated as: λ 1 = 0.1, λ 2 = 0.2, λ 3 = 0.2, λ 4 = 0.5.We make £ = 3.5 in Step 3.

EXPERIMENT RESULTS
In the following, we compare the proposed algorithm with the leading whole-image and localregion based color constancy algorithms using the same data set.In Table 1, the results of many classic wholeimage based algorithms such as Grey World, Max-RGB and Shades of Grey (SOG) are summarized.In addition, the local-region based algorithms' results also are compared.From the result in Table 1, we can find that the proposed algorithm ECI is more perfect than all other existing algorithms in angular degrees.Interestingly, the median angle and chromatic distance of ECI are only 0.62 and 0.51 respectively.Table 2 tells us that the performance of ECI is statistically equivalent to TPS, but it is better than the other algorithms.

CONCLUSION
A novel color constancy algorithm using effective candidate images based on image similarity (ECI) is proposed in this study.Unlike most of the algorithms available, it uses effective color features in every region rather than the whole image in order to avoid illumination estimation bias.What is more important is that illumination is estimated using effective candidate images rather than the whole image class.It greatly improves the accuracy of illumination estimation.Algorithms were evaluated a large data set, the results show that ECI is more effective compared with the former statistics algorithms in angular degrees.In the future research work, I will explore how to optimize parameters to improve the algorithm.
Fig. 1: An example of a basic segmentation into 8×8 grid

Table 1 :
Comparison ECI performance with other algorithms Angular degrees