




































In ternationa l
Scholars
Journa ls

 

African Journal of Pig Farming ISSN 2375-0731 Vol. 7 (4), pp. 001-008, April, 2019. Available online at 
www.internationalscholarsjournals.org © International Scholars Journals 

 

Author(s) retain the copyright of this article. 

 
 
 

Full Length Research Paper 

 

Improving the quality of pigskin leather texture 
images using enhanced image processing 

 
Mohd Hafrizal Azmi, Fakhrul Zaman Rokhani, Raja Syamsul Azmir Raja Abdullah 

and M. Iqbal Saripan* 

 
Department of Computer and Communication Systems Engineering, Faculty of Engineering, Universiti Putra 

Malaysia, 43400, UPM Serdang, Selangor, Malaysia. 
 

Accepted 22 January, 2019 
 

In this paper, we propose a method to improve the quality of pigskin leather texture images using digital 
image processing approach. The proposed method intends to minimize the imbalance illumination 
problem that occurs in the images captured from consumer leather products. This method is compared 
with the other methods in the literature such as contrast adaptive binarization method, and the results 
showed that the proposed method yielded better results in terms of highlighting the special 
characteristics of pigskin in consumer leather products. 

 
Key words: Digital image processing, pig skin images, binarization, local global analysis, histogram. 

 
INTRODUCTION 

 
Pigskin leather has been used widely in consumer 
products such as leather jackets, shoes, handbags, etc. 
The use of pigskin in leather products has some 
advantages and disadvantages in terms of the quality, 
stiffness, toughness, smoothness and cost. For a rapid 
assessment of the type, digital image processing can be 
utilized to check the special characteristics of the pigskin, 
that is, a group of three hair pores. Sometimes, these hair 
pores can be seen by human eyes, but at other times, 
they are hidden by the color. However, during the image 
capturing process, presence of variable illumination 
distorts the quality of the image. This variable illumination 
could be extracted as false patterns in the images, thus it 
could lead to a wrong interpretation. Therefore, in this 
work, we use the digital image processing to improve the 
quality of the image by removing the effects of variable  
 
 
 
*Corresponding author E-mail: iqbal@eng.upm.edu.my. Tel: 
+603-89464344. Fax: +603-86567127. 

 
 
 

 
illumination. When dealing with a raw image, the 
imbalance lighting effect is a common challenge that 
should be corrected before proceeding with further 
enhancement process (Basri and Jacobs, 2004) 
especially for the low-contrast image (Chen et al., 2004). 
With the goal to enhance the texture image, imbalance 
illumination will affect the performance of any algorithm 
particularly for automatic image analysis such as 
segmentation, registration, quantification (Basri and 
Jacobs, 2004), recognition (Du and Ward, 2005; 
Gonzalez, 2004) and classification thus could lead to 
false result. Previously, we have proposed the local-
global block analysis to overcome the problem. However, 
the method leads to a new problem which is the 
occurrence of boundaries between blocks, also known as 
blockiness effect (Liu et al., 2001). This new artifact will 
potentially worsen the quality of the output image after 
classification procedure. We have discovered the cause 
of the boundary existence and in this paper we propose a 
set of modifications to the local-global block analysis to 
minimize the blockiness effect. Results presented later in 



 
 
 
 
 

this paper include the binarization of each output images 
of contrast adaptive, local-global block analysis and our 
proposed method to validate the performance of each 
method. 
 

 

RELATED/PREVIOUS WORK 

 

Previously, there are numbers of image enhancement 
algorithms that have been developed to deal with 
illumination. Generally, we can categorize the 
enhancement algorithms into two approaches. The 
former intends to increase the quality of the output image 
as a whole and may not perform well over some regions 
while the latter will perform the enhancement process 
independently on a group of neighbourhood pixels within 
the image (Jack et al., 1990). The research to date has 
tended to focus on face recognition and optical character 
recognition rather than texture recognition and 
classification. The most popular and well established 
method used is homomorphic filtering (Juhua et al., 
2003). But we showed in (Saripan et al., 2009) that local-
global analysis performs better in texture images. The 
other existing methods include wavelet transform (Lee et 
al., 2001) logarithm and discrete cosine transform (Meng-
Ling and Yap-Peng, 2004) nine points of light (Ruiz-del-
Solar and Quinteros, 2011) recursive least squares 
algorithm (Chen et al., 2004) and many more elaborated 
in (Du and Ward, 2005).  

These methods involve complex calculation and 
computation-intensive which is not suitable for real-time 
automatic system. The most popular method used is 
homomorphic filtering. But we proved in (Lee et al., 2001) 
that homomorphic filtering technique does not perform 
better than local-global block analysis. Another interesting 
method is the local normalization using zero-mean and 
unit variance (Tomaževič et al., 2002) which considers 
the quotient value of some parameters obtained within 
local area in the image. However, this method is mainly 
developed for face recognition field and its assumptions 
made are related to face recognition which is not suitable 
for texture. It assumes that the image of the face is a 
combination of small and flat facets, the light source is 
from one direction only and the face is in neutral 
expression. Another method that attracts our interest is 
the contrast adaptive binarization (Xudong and Kin-Man 
2006). This method works well to improve contrast and 
remove the random noise of low quality document image 
but perform poorly in texture image. We will show the 
output images of this method as a comparison to the 
proposed method in the result section. In (Saripan et al., 
2009) local-global block 

  
 

  
 
 

 

analysis has been proposed to provide a fast and reliable 
method for illumination compensation. This technique is 
developed based on micro and macro levels analysis, a 
shown in Figure 1. In digital image analysis, images are 
formed by a series of square pixels.  

The image could be divided into non-overlapped blocks 
in which each block contains group of pixels. Local global 
block analysis method utilizes the information provided 
within the block. Local is defined as the area within block 
while global is the area that covers the whole image. This 
method assumed that there is very little fluctuation of 
illumination component exists within local area. 
Therefore, the size of the block must be small. For each 
local area, the local mean intensity will be calculated. For 
example, within 120 × 120 image, there will be 10 × 10 
blocks in the image, assuming a block size of 12 × 12. 
With this configuration, the image is consists of 100 local 
mean values. If we assume that an image f(x,y) has a 
size of M × N, and divided into blocks of f(a,b), hence 
local mean could be expressed as : 
 

local a, b     
M

x
a
a



1
M a N

y
b
b



1
Nb  f x, y  MaNb

 (1.1) 

 

Where local a, b the local mean of the local blocks is 

 a , b is the index number of the blocks and M a  Nb   is 
the size of the local blocks. The global mean intensity 
can be calculated using this equation: 
 


global  


  

M
x0 N

y0 

f
 

(
 

x,
 

y
 

)
  

M
 


 

N
 (1.2)  

Where global is the global mean of an image. Then, the 

difference between local mean and global mean is given 

by this equation: 
 

  x, y   f x, y  local x a  , y  b (1.3) 

 

Finally, to obtain the illumination compensated image, the 
local residual pixel is normalized to the position of the 
global mean. 
 

ˆ 
x, y    x, y global (1.4) 

 

f 
 

Where 
ˆ 
x, y  is the  normalized output image.  This 

 

f 
 

technique however will produce one new artifact which is 
the blockiness effect. The blockiness effect is the 
existence of block pattern within the image, which is in 



  
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

 
Figure 1. Traditional local-global block analysis.  

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

 
Figure 2. Case A and case B of boundary pixels. 

 
 

 

this case, the boundary between certain adjacent local 
areas become visible (Liu et al., 2001). The boundaries 
do not occur everywhere else in the image, except in the 
areas as shown in Figure 2 This effect happens because 

 
 
 

 

of the intensity of certain pixels that lies at the boundary 
of the local block is closer to the adjacent local mean 
instead of their local mean. For this reason, we can 
eliminate the blockiness effect by applying a few 



 
  

 

 

Ma 
  

Nb local  am , bn  

 

local  am , bn1  

  
 

   
 

 

 

 
 

  
 

  
 

   

f   xi , y j  
 

N 

 

    

 

 

    
 

       
 

  α1  α2   
 

        
 

        
  

 

M 
 

Figure 3. Local-global block analysis with horizontal neighbourhood improvement. 
 
 

 

modifications to the residual equation. 
 

 
PROPOSED METHOD 
 
As explained in previous chapter, blockiness effect occurs because 
of the intensity value of boundary pixels are closer to the adjacent 
local mean value instead of their own local mean. When this 
situation happen, the variations of intensity values across the 
boundary are obvious, therefore the block pattern is visible. In the 
traditional local-global block analysis technique, every pixel will be 
subtracted by their local mean and the residual value will be 
normalized to the global mean as shown in Equation 1.3 and 1.4. 
But, in order to minimize the blockiness effect, pixels at the 
boundary will be subtracted by their local mean and adjacent local 
mean as shown by α1 and α2 in Figure 3. In this paper, only 
horizontal neighbourhood block will be considered. So, instead of 
considering only their local mean as in Equation 1.3, we should now 
also consider the adjacent local mean value by applying Equation 
1.5. We know that there are two cases of boundary pixels, either  
they are located along the column y  12n 1 or y 12n where n 

is integers from 1 to 9. We assume that the pixels located along y  

12n 1 are known as case A while the other are case B. For 
 
case A, the residual pixel is calculated by subtracting the pixel 
intensity value to its right adjacent local mean value as shown in 

Equation 1.5. For example, for pixel  f xi , y j  that is located in 

block f am , bn  , the  residual  value  can be  calculated by  

subtracting its intensity value to the local mean, local a m , bn  . 

While for case B, as for example pixel f xi , y j 1  , its own local  

mean is given by local am , bn1  and the neighbour local mean 

that should be consider is local am , bn . 

 
 
 

 
 

ˆ c  b  1 for y  12 n 1 (1.5) 
  x, y   f x, y  local x a , y c  

 c  b  1 for y 12n  
After applying Equation 1.3 and 1.5, we got two residual values 
which is the difference between boundary pixels and its own local 
mean and the difference of the boundary pixels and it’s adjacent to 
local mean. Now these values will be compared and the smaller 
value will be chosen to be normalized to the global mean using 
Equation 1.4. However, by modifying only the border pixels of each 
local area, it is not sufficient to totally eliminate the blockiness 
effect. We need to observe the horizontal neighbourhood pixels of 
modified image until we found the pixel that has an intensity value 
closer to its local mean value. The equation to completely calculate 
all the residual values by considering the boundary pixels and their 
horizontal neighbor pixels is given as; 
 
Case A:    

 

ˆ 
  f xi , y j   local  x a  , y b 1 

(1.6) 
 

  x, y  
 

  j  j 1  
 

Case B:    
 

ˆ 
  f xi , y j  local  x a  , y b 1 

(1.7) 
 

  x, y  
 

  j  j 1  
 

 
Where case A refers to boundary pixels located at position 12n-1 
while case B refers to pixels located at position 12n. This situation 

is shown in Figure 3, where pixel  f  xi , y j  
is assumed to be

 

pixel that closer to adjacent mean value, local am , bn1  
instead

 

of its local mean value, localam,bnand the dots boxes show  
the potential pixel that needed to be modified. The modification will 

stop  at  pixel
   f xi , y j 3  with   assumption   that   at    the 



 
  
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

 
Figure 4. Pixel intensity for the local-global output image and proposed method output image. 

 
 

 

position xi , y j 4 , the pixel intensity value is closer to its local area 

mean. 

 

EXPERIMENTAL RESULTS 
 
We have applied our proposed method to several pigskin 
images taken by digital camera under different 
illumination conditions with the block size of 12 × 12 
pixels. The size of the block can vary based on the 
illumination condition and characteristic of texture that 
must be preserved after the process. In our case, 12 × 12 
pixels of block size gave the most considerable result in 
terms of illumination compensation, characteristic kept 
and minimal blockiness effect. Figure 4 shows the 
intensity value of pixels along the same selected row in 
the image after being applied with local-global block 
analysis with and without improvement. Horizontal axis 
represents the position of pixels while vertical axis 
represents the intensity value of each pixel. The solid line 
shows the intensity value of unimproved image while the 
dots line shows the intensity value of improved image 
with proposed method. As we can see, there are 
improvements occur in several places on the graph. In 
the range within pixel 36 to 42, the rapid changes of 
intensity value of pixels that lead to blockiness effect is 

 
 
 

 

now reduced. The same trend occurs along the graph 
where the reductions of variations in pixel’s intensity are 
observed. This characteristic illustrates how the 
blockiness effect along the horizontal line of the image 
has been minimized. Figure 5(a and b) highlight the 
obvious improvement occurrence after we applied the 
proposed method.  

It is noticeable that within region a in the graph, the 

variation of intensities is rapid, which shows the obvious 

difference level of intensity between pixel 36 and 37, hence 

leads to blockiness effect. But after we applied the 

improvement method, the difference value between these 

two pixels is now reduced. The same goes with region b 

shown in Figure 5(b). The decrement of intensity variation 

means that the intensity across the boundary is now 

smoother, which reduced the visibility of block pattern. At 

the same time, the main characteristic of the graph is still 

maintained. It shows that the proposed method does not 

temper the original characteristic of the sample images. 

Figure 6 shows the comparison of output images after being 

applied with several methods including our proposed 

method. Excluding the contrast adaptive, the other output 

images are then binarized to show whether the methods 

applied can extract only the information needed of the 

texture image while sweeping away the unnecessary 

information. Contrast adaptive comprises 



 
   

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

 

5a  
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

 

5b 

Figure 5. a The variation of pixel intensities located from 
  

to  f 
  

; b .The variation of 
 

f  14, 32  14, 42  
  

   

f 
   

 

pixel intensities located from  f  14, 47  to 14, 55  . 
 

 
 

 

the binarization process in its algorithm, thus we did not 
need to binarize its output images. The threshold value 
was manually chosen and set based on the sample 
image. Each sample has its own unique threshold value 
and the value is applied to every methods. When a 
simple thresholding technique is applied directly to the 
original image, some regions in the image became black 
because they are affected by illumination and the texture 
on that region is now concealed. The contrast adaptive 
binarization method could not manage to preserve the 

 
 

 

texture of the image; hence it is not suitable to be used in 

extracting the information of texture images. Local global 

block analysis succeeds in compensating the illumination, 

but it leads to blockiness effect. Proposed method finally 

successfully removes the horizontal blockiness effect by 

reducing the large fluctuation of intensity amplitudes occur 

at the boundary of the blocks. Furthermore, it gives the best 

result among other methods in terms of the occurrence of 

noise after binarization process. This is significantly helpful 

for future classification process. 



 
  
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Figure 6. Output images. 
 
 

 

Conclusion 

 

We have proposed a method to improve the visibility of 
the pigskin leather in consumer products using an 
improved method of local-global block analysis for 

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

 

illumination compensation by considering the horizontal 
neighbourhood local mean value. Each pixel that lies at 
the boundary between blocks will be modified based on 
the information of adjacent block and it follows with the 
neighbourhood of the modified pixels. In comparison with 



 
 
 
 
 

contrast adaptive and traditional local-global analysis, the 
proposed method is proven to perform better for 
correcting the imbalance illumination for texture images. It 
preserves the characteristic of the texture and reduces 
noise occurrence after the binarization procedure. 
 

 
REFERENCES 
 
Basri R, Jacobs D (2004). “Illumination Modeling for Face Recognition,” 

Chapter 5, Handbook of Face Recognition, Stan Z. Li and Anil K. Jain 
(Eds.), Springer New York, pp. 89-111.  

Chen W, Er MJ, Wu S (2004). Illumination Compensation and 
Normalization Using Logarithm and Discrete Cosine Transform, Proc. 
of IEEE International Conference on Control, Automation, Robotics 
and Vision 1, pp. 380-385.  

Du S, Ward R (2005). “Wavelet-based illumination normalization 
for  

face recognition,” Proc. of IEEE Int. Conf. Image Proc., 2: 954-957. 
Gonzalez RC, Woods RE (2004). “Digital Image Processing,” Prentice- 

Hall, New Jersey.  
Jack C, Chung H, Gary G (1990). Leinenger, “Compensation of non-

uniform illumination and background variations using recursive least 
squares algorithm,” J. Crystal Growth, 103(1-4): 389-397.  

Juhua Z, Bede L, Stuart CS (2003). “General Illumination Correction 
and its application to face recognition,” Proc. of IEEE Int. Conf. 
Acoustic, Speech Signal Proc., 3: 133-136. 

  
 

  
 
 

 
Lee K, Ho J, Kriegman D (2001). “Nine points of light: Acquiring 

subspaces for face recognition under variable lighting,” Proc. IEEE 
Conf. Comput. Vision Pattern Recog., 1: 519-526,  

Liu H, Wen G, Jun M, Debin Z, Gang D, Jintao L (2001). “Illumination 
compensation and feedback of illumination feature in face detection,” 
IEEE Int. Conf. on Info-tech and Info-net, Beijing, 3: 444-449.  

Meng-Ling F, Yap-Peng T (2004). “Contrast adaptive binarization of low 
quality document images,” IEICE Elect. Express., 1(16): 501-506.  

Ruiz-del-Solar J, Quinteros J (2011). “Illumination compensation and 
normalization in eigenspace-based face recognition: A comparative 
study of different pre-processing approaches,” Pattern Recog. Let., 
29(14): 1966-1979.  

Saripan MI, Azmi MH, Raja ARSA, Anuar LH (2009). “Illumination 
compensation in pig skin texture using local-global block analysis,” J. 
Modern Appl. Sci., 3(2): 89-93. 

Tomaževič D, Likar B, Pernuš F (2002). “Comparative evaluation of 
retrospective shading correction methods,” J. Mic., 208(3): 212-223.  

Xudong X, Kin-Man L (2006). “An efficient illumination normalization 
method for face recognition,” Pattern Recog. Lett., 27(6): 609-617. 


