Illumination Compensation in Pig Skin Texture Using Local-Global Block Analysis

Variable illumination in a texture is a common problem occurs to a real-time image modalities. The imbalance illumination in a texture creates virtual regions within one image, hence it affects the performance of the classification methods because it introduced an artifact patterns or virtual regions to an image. This paper presents a method to overcome the variable illumination problem in a pig skin texture using the information in the local and global blocks. The focus of this paper is to provide a fast, reliable and safe method to stabilize the lighting in an image. Pig skin texture is selected because it has a special pattern characteristic that needs to be preserved. The results show that in terms of the fluctuations contrast amplitudes in an image, the local-global method give better results than the standard homomorphic filtering technique.


Introduction
An image is formed from a combination of the illumination part and the reflective part.A variable illumination condition in an image creates difficulties to further process the image, because often, different regions with different illuminations give different classification results.In this paper, we concentrate on correcting the imbalance lighting condition in an imaged texture.This is a vital pre-processing step to obtain an accurate classification result.
The problem with imbalance illumination is one of the common challenges in image processing, especially in the area of segmentation and classification like texture processing (Thai and Healey, 1998) and face recognition (Adini and Moses, 1997).To address this problem, there are many works have been done in the past using methods like wavelet transform (Du and Ward, 2005), logarithm and discrete cosine transform (Chen et al., 2004), nine points of light (Lee et al., 2001) and others.The most common method in dealing with variable illumination is probably the homomorphic filtering technique (Delac et al., 2006).This technique utilizes the physics of image creation, whereby an image is formed of an illumination component and a reflectance component.By separating these two components, one may be able to correct the imbalance lighting part without tempering with the reflectance part.
Whereby most of the previous works in the literature are concentrated on multiple objects images like digital photographic images, this work is conducted on texture images.In texture images, the non uniform illumination may lead to false classification.In addition to that, since many automatic classifications are developed based on the patterns or features analysis of the texture, variable illumination could be extracted as one of the artifact patterns in the intelligent system, thus could also creates wrong interpretation.
The type of texture that we use in this paper is a pig skin leather texture.The pig skin leather is chosen because it has a unique characteristic in the arrangement of the hair pores by having three hair pores for pig skin leather is located closely together.Figure 1 shows an example of ideal dots patterns observed from hundreds samples of pig skin.
This visible characteristic may be used to identify this type of leather.Whilst investigating different cases of illumination, these dots must be preserved in order to classify the type of texture in the latter stages, and this is the challenge taken by this project.In this work, the samples are acquired using a digital camera under different illuminations conditions, and cropped to 120×120 pixels.The illumination condition is non-linear with respect to the area of the surface of the texture.
In this paper, we proposed a technique to repair the imbalance illumination using the information obtained in the local block, as well as in the global block for texture images with the focus on pig skin leather.Figure 2 shows the original pig skin textures that suffer from the problem of imbalance illumination.The value of the standard deviation, indicates the level of fluctuations of the intensity in an image.Taking (a) as an example, due to the imbalance illumination, instead of having just one uniform region, there are three regions identified in the image: top left, centre and top right of the image.As shown in the figure, the imbalance lighting area creates different partitions or regions in the image and it creates an artifact character for such texture.This false alarm affects the quality of the texture image, and it can lead to the problem of misclassification.
In the next section, we present our proposed method based on the difference of the current intensity value of a particular pixel with the mean of a local block.Then, the local normalized value is normalized again to a global block.This method is known as a local-global block analysis.Section 3 comprises of the results and discussions.The performance of the proposed method is measured objectively using the standard deviation to look at the fluctuations range, and subjectively using the visual inspections.Finally, the findings are concluded in the final section of this article.

Local-Global Block Analysis
Digital images are formed from a series of square pixels.For many apparent reasons, grouping a number of adjacent pixels into a block is one way of processing the image (Charalampidis, 2006).The local-global block analysis is a method developed based on the micro and macro levels analysis.The proposed method is processed in the spatial domain.Local (or micro) blocks are useful in terms of providing local information of a particular block.The assumption that we impose in developing this algorithm is, there is no or very little variation in the illumination component within the local blocks.Therefore, to make this assumption valid, the size of the blocks must be small.This is because the bigger the size of the blocks, the higher probability of the imbalance lighting within the local blocks.On the other hand, if the size of the blocks is too small, thus there will be too many local mean values that affect the local residual pixels of an image.The analysis of different sizes of blocks is included in the next section.
Figure 3 shows the difference between the local mean and the global mean, in an image.Based on the figure, we can see that the global mean covers all the area in an image, therefore, the value that will be extracted represents the mean of the total illumination component.In terms of image histogram, the global mean represents the middle value in between of the maximum and minimum bins of grey levels recorded by the image.In this case, we presume that the global mean is located exactly or about the middle within the range of the grey values.For the case of the location of the global mean in the histogram is too low or too high, the colour bit depth will be added to accommodate the global residual pixels in an image.Once the range of the bins is confirmed, it can be normalized back to the original bit depth.Next, depends on requirements, the image can be enhanced using appropriate algorithms.
If we assume that an image of ( , )  f x y has a size of M × N and made from many blocks of ( , ) f a b hence the local mean in the local block can be shown as In this method, the global mean value that covers all the area in an image is also calculated.The calculation can be shown as: where global is the global mean of an image.Notice that global is not a function, but a constant.
Taking image in Figure 2(a) as an example, the local mean of this image when a 6×6 block is used is shown in where ˆ( , ) f x y in the above equation is the output image after the normalization process.In this algorithm, the normalization process in done using the adding process.There are two main purposes of choosing this process.First, it will result the positive and negative directions of the residual pixels.The positive value indicates that the particular pixel has a brighter pixel value, while the negative value implies a darker pixel value.The second purpose is to preserve the contrast between pixels in an image.By taking the original local residual pixel, the contrast within the local pixel is saved, and then it is re-located to the new value based on the global mean.By implementing this step, the local block will provide the micro level residual pixel, and the global block will provide the normalization level.
Looking at the presented steps, since the proposed method is processed in the spatial domain, hence it is actually generic and may be used for any texture images, either as the preprocessing unit or after any processes that have been imposed to the images.

Results and Discussion
The result obtained from the homomorphic filter is shown in Figure 5(a).The standard deviation of this image is 53.59.This image is obtained by applying the homomorphic filter to the texture in Figure 2(a).From the output image itself, we may predict that the standard deviation is large, i.e. the distribution of the intensities is wide.Although the image is getting better visually, but the problem of imbalance lighting is not cured.The image is only better to our vision because of the good contrast, but on the image segmentation aspect, the three regions are getting more separated.
Using the proposed method of local-global block processing, we must first decide the size of the local block a b M N .
There are seven different sizes of blocks presented in this article: 2×2, 4×4, 6×6, 8×8, 10×10, 12×12 and 24×24.The results generated for the earlier category are given by Figure 5(b)-(h).From the initial visual inspection, we can see that in terms of the balance of the lighting, these images are better than the original image (in Figure 2(a)) or the filtered image (in Figure 5(a)).
Comparing between different sizes of blocks, we can see that the proposed method with 4×4 and 6×6 blocks, give good results.The bigger the size of the local blocks, the boundary in between of the blocks is become more visible.This is because for pixels located at the boundary of the blocks, there are cases where the intensity value is closer to the adjacent local mean instead of their local means.Therefore, the blockiness is now become a problem to be solved.
Although one may use a deblocking filter like in (Sima et al., 2004), but in this article, we do not extend our work to that direction.Instead, we focus on the potential of the proposed method to directly improved the lighting distribution in a texture.Based on the subjective visual perception, the best results are given by 4 × 4 and 6 × 6 blocks.The value of the standard deviation is shown in Table 1.From the table, we can see that the larger the size of the blocks, the higher the standard deviation, i.e. the bigger fluctuation amplitudes of the intensity.However, as we have seen from Figure 5, the smallest value of the standard deviation does not also necessary indicates the most quality image.This is because, when smaller size of blocks used in this method, the averaging process wipes away the original characteristics of the texture.

Conclusions
In this paper, we demonstrated that using the information provided in the local block can be used to estimate the residual intensity at every individual pixels.Combining this information with the global mean of an image, we were able to show that it can be utilized for correcting the variable illumination problem in pig skin texture images.We also show that the algorithms proposed by this paper do not temper the original characteristic of an image.Pig skin texture is selected to demonstrate this feature.Comparing the proposed method with the homomorphic filtering technique shows that the illumination given by our method is more balanced than the latter method.This algorithms can be extended further by enhancing the contrast of the image and etc.
local a b is the local mean of the local blocks, (a,b) is the index number of the blocks and a b M N is the size of the local blocks.For instance, a 120×120 image has 15×15 blocks of size 8 × 8 pixels.In this example, the search for local means is for 8 × 8 pixels of all 225 blocks.
Figure 4.The solid lines show the local means for every 6×6 block in the image, plotted across y axis.Compare that with the global mean (indicates by the straight dotted line at value 150), we can see that most of the local mean are located further from the global mean, and this imply the problem of the imbalance lighting.The difference between the local mean and the local pixel can be calculated based on the following equation: obtain the illumination compensated image, the local residual pixel is normalized to the position of the global mean.

Figure 1 .Figure 2 .
Figure 1.An ideal pattern of pig skin leather with three dots closely located together.There two different patterns of pig skin leather, either in a triangle shape (a) or a line shape (b).

Figure 3 .
Figure 3.The difference between the local and global area in an image.

Figure 4 .
Figure 4.The local and global mean of image in Figure 2(a).The dotted thick line is the global mean while the solid lines are the local means.In this example, 6 × 6 blocks are used.
Figure 5.The output texture images.

Table 1 .
International Conference on Image Processing 2, 954-957.Lee K.,Ho J., and Kriegman D. (2001), Nine points of light: Acquiring subspaces for face recognition under variable lighting, Proc. of IEEE Conference on Computer Vision and Pattern Recognition 1, 519-526.Sima M., Zhou Y., and Zhang W. (2004), An efficient architecture for adaptive deblocking filter of H.264/AVC video coding, IEEE Transactions on Consumer Electronics, 50(1), 292-296.Thai B. and Healey G. (1998), Results on deriving optimal filters for illumination-invariant color texture recognition , Proc. of the IEEE International Conference on Systems, Man, and Cybernetic,s 5, 4312-4317.The standard deviation of different sizes of blocks for image in Figure 2(a).The above table shows the standard deviation of different local window size, varying from 2x2 to 24x24 pixels