1. Introduction
Image segmentation is an important technique in image processing. It plays a critical role incomputer vision, pattern recognition, medical image processing. A large number of imagesegmentation techniques have been developed so far, and the threshold segmentation is one of the most commonly used techniques due to its simplicity and ease of implementation.
A number of different kinds of thresholding methods have been reported, such as entropy thresholding [1], Otsu segmentation [2] and minimum error method [3], etc. Among thesemethods, the entropy thresholding proposed by Pun [4] is used to calculate the optimalthreshold by maximizing the upper bound of a posteriori entropy. And many extensions based on Pun’s method have been developed.
Entropic thresholding method based on 1D image histogram (KSW) is widely used, which does not consider the gray level spatial distribution information. To overcome this shortcoming, many different kinds of 2D histogram have been proposed by embedding spatial information. Abutaleb proposed to use the gray level of pixels as well as the average gray level of pixels in its neighborhood to construct 2D histogram (2D-KSW) [5]. Xiao used Gray-level Spatial Correlation (GLSC) to construct GLSC histogram (GLSC-KSW) [6]. Yimit proposed an entropic thresholding method based on 2-D direction (2D-D) histogramby using the local edge property computed from the orientation histogram of a gradientimage (2D-D-KSW) [7]. These improved methods perform better than the method based on 1D histogram. However, they can not differentiate edge and noise pixels in image effectively. To solve this problem, Xiao proposed a new entropic thresholding algorithm (GLGM-KSW) [8] based on gray-level and gradient-magnitude histogram (GLGM histogram), which calculates the gray level occurrence probability and spatial distribution simultaneously. GLGM histogram possesses stronger capability for image components discrimination than 2D 、GLSC and ( 2D-D) histogram. However, the anisotropic diffusion filtering is employed as the image preprocessing in constructing the GLGM histogram, the filtering operation thushas a negtive effect on the recognition of image edges. Recently, the GLLV histogram constructed from gray level of pixels and the local variance of its neighboring was proposed by Xiulian Zeng [9]. Though the improved performance is obvious, 2D entropic thresholding methods still need enhance the performance of edge recognition.
As reviewed above, the histogram constructed by taking spatial information into account can improve the entropic thresholding performance. Image spatial information can berepresented by its local texture features, and different texture features may distinguish foreground/background, edge and noise of image. Therefore, import of texture features to construct a histogram can improve edge recognition performance of the entropicthresholding. To develop a better technique for texture feature extraction, we propose the entropic thresholding method based on Gabor histogram that a new 2D histogram (Gaborhistogram) is constructed by Gabor filer simulating the receptive field of visual cortex, which can distinguish foreground/background, edge and noise of image effectively.
The remainder of this paper is organized as follows: in Section2 the proposed method is described. Then the experimental results are presented and compared with existing methods in Section3. Finally, conclusions are provided in Section4.
2. The proposed method
Embedding spatial information can improve the performance of entropic thresholding methods, while further work is still needed to improve the edge recognition performance. Tosolve this problem, a novel 2D Gabor histogram which can distinguish edge of image effectively is constructed, and the entropic thresholding method based on Gabor histogram is proposed. This method has briefly three steps, firstly Gabor filter is used to extract texturefeature of image, and then Gabor histogram is constructed according to these texture feature, finally, the optimal entropy threshold based on the Gabor histogram is calculated.
2.1 Construction of Gabor histogram
The 2-D Gabor filter is a Gabor function constructed on structure information of image, which can well describe the local structure information corresponding to the spatial frequency (scale), spatial position and orientation selectivity [10]. Therefore, more accuratelocal structure information can be obtained through calculating its local optimal value. In this study, the Gabor histogram is constructed by using 2-D Gabor filter to indicate the gray scale, scale information and orientation information of image. In the following, we will introduce how to construct Gabor histogram.
For an image \(I(x, y)\) of size Q x R with gray level set \(G=\{0,1, \ldots, 255\}\) , where \(x=1,2, \ldots, Q\) and \(y=1,2, \ldots, R\) . Firstly\(I(x, y)\) is convoluted with 2-D Gabor kernel function, defined as \(G(x, y)\) . And then a new image \(F(x, y)\) is obtained by:
\(F(x, y)=I(x, y) * G(x, y)\) (1)
Where the * means convolution operate.
A two-dimensional Gabor filter is a Gaussian kernel function modulated by a complex sinusoidal plane wave [11], defined as:
\(G(x, y)=\frac{f_{\alpha}^{2}}{\pi \gamma \eta} \exp \left(-\frac{x^{2}}{\gamma^{2}}+\frac{y^{2}}{\eta^{2}}\right) \exp \left(j 2 \pi f_{a} x^{\prime}+\phi\right)\) (2)
\(\begin{aligned} &x=x \cos \theta_{\beta}+y \sin \theta_{\beta}\\ &y=-x \sin \theta_{\beta}+y \cos \theta_{\beta} \end{aligned}\)
Where \(\gamma\) the sharpness along the major axis, and η the sharpness along the minoraxis (perpendicular to the wave), ϕ is the phase offset. fα is the frequency of the sinusoid, \(f_{\alpha}=\sqrt{2}^{-k 1} f_{\max } \quad \alpha=\{0, \dots, n-1\}\), where fmax is the maximum frequency of the sinusoid. θβ represents the orientation of the normal to the parallel stripes of a Gabor function, and \(\theta_{\beta}=\frac{\beta \cdot 2 \pi}{m} \quad \beta \in\{0, \ldots, m-1\}\). The n represents the number of scale and m represents the number of direction. According to the numbers of scale and orientation, m × n (instead as K in the fellow) 2-D Gabor kernel functions can be obtained.
In this paper, let the m be 4 and n be 5 (four orientations and five scales). The 4 orientations can basically display the main orientations of the texture details in image. Thescale is selected from small to larger. And as too small scale can not reflect the image detail, and too large scale may make the calculation too complicated, 5 scales are selected. Thus 20(4x5=20) Gabor filters in four orientations and five scales can be obtained, and they areshown in Fig. 1.
Fig. 1. Twenty Gabor filters with different directions and scales
Based on formula \(\text { 1, } I(x, y)\) is convoluted with twenty Gabor filters of differentorientations and scales respectively, and then twenty convolution images \(F_{K}(x, y)\) \(K \in\{1,2 \ldots, 20\}\)can be obtained. The filter is able to describe the detail edge information with the large neighborhood convolution value. Therefore, the maximum neighborhood convolution value is used to describe the edge information, defined as \(h_{\Theta}(x, y):\)
\(h_{\Theta}(x, y)=\max \left(\sum_{j=-(w-1) / 2}^{(w-1) / 2} \sum_{i=-(w-1) / 2}^{(w-1) / 2} F_{K}(x+i, y+j)\right)\) (3)
Let \(\Theta(x, y)\)represents the sign of convolution image with the maximum neighborhood convolution value \(h_{\Theta}(x, y)\) . Each pixel\(I(x, y)\)corresponding to an optimal Gabor filter, of which sign is \(\Theta(x, y)\) . The gray value of pixel \(I(x, y)\) and \(\Theta(x, y)\)can be used to constructGabor histogram, calculated as:
\(h(s, q)=\operatorname{prob}(f(x, y)=s \text { and } \Theta(x, y)=q)\) (4)
The normalized Gabor histogram is as follow:
\(\hat{h}(s, q)=\frac{N u m(s, q)}{Q \times R}\) (5)
\(\sum_{s=0}^{L-1} \sum_{t=1}^{K} \hat{h}(s, q)=1\) (6)
Where \(s \in G \text { and } q \in\{1,2, \ldots, 20\}\), the Num (s, q) represents the number of pixels with meeting the conditions of \(f(x, y)=s\) and \(\Theta(x, y)=q \cdot Q \times R\) represents the number of pixels on whole image.
Take the Lena image as example, the Gabor histogram constructed by twenty Gaborfilters is shown in Fig. 2.
Fig. 2. Lena origin and its Gabor histogram: (a) Lena origin (b) Gabor histogram
2.2 Entropic threshold selection
Based on the Gabor histogram, the maximizing entropic criterion function is used to choose the optimal threshold. And the optimal threshold is computed as follows.
For an image \(I(x, y)\) , its gray level set \(G=\{0,1, \ldots, 255\}\), and its probability function \(p(s, q)\) can be presented by the normalized Gabor histogram\(\hat{h}(s, q)\)
\(p(s, q)=\hat{h}(s, q)\) (7)
Where \(s \in G \text { and } q \in\{1,2, \ldots, 20\}\)
Suppose that the pixels in the image are divided into two classes \(G_{O}=\{0,1,2, \ldots, t\}\) and & nbsp;\(G_{B}=\{t+1, t+2, \ldots, 255\}\) through a threshold t . Where Go represents background and GBis object or vice versa. And then the probability functions of two classes are given by:
\(\left[\frac{p(0,1)}{P_{o}(t)}, \ldots, \frac{p(0, K)}{P_{o}(t)}, \frac{p(1,1)}{P_{o}(t)}, \ldots, \frac{p(t, K)}{P_{o}(t)}\right]\) (8)
\(\left[\frac{p(t+1,1)}{P_{B}(t)}, \ldots, \frac{p(t+1, K)}{P_{B}(t)}, \frac{p(t+2,1)}{P_{B}(t)}, \ldots, \frac{p(255, K)}{P_{B}(t)}\right]\) (9)
Where \(P_{o}(t) \text { and } P_{B}(t)\) can be written as:\
\(P_{O}(t)=\sum_{s=0}^{t} \sum_{q=1}^{K} p(s, q)\) (10)
\(P_{B}(t)=\sum_{s=t+1}^{255} \sum_{q=1}^{K} p(s, t)\) (11)
And:
\(P_{O}(t)+P_{B}(t)=1\) (12)
The entropy of object and background are:
\(H_{O}(t)=-\sum_{s=0}^{t} \sum_{q=1}^{K} \frac{p(s, q)}{P_{O}(t)} \ln \left(\frac{p(s, q)}{P_{O}(t)}\right)\) (13)
\(H_{B}(t)=-\sum_{s=t+1}^{255} \sum_{q=1}^{K} \frac{p(s, q)}{P_{B}(t)} \ln \left(\frac{p(s, q)}{P_{B}(t)}\right)\) (14)
The entropy of whole image is:
\(\phi(t)=H_{o}(t)+H_{B}(t)\) (15)
Finally, the optimal threshold t is selected by maximizing the φ(t) shown as:
\(t^{*}=\arg \max \phi(t)\) (16)
3. Experimental Results and Discussion
The proposed method is tested on various images to demonstrate its effectiveness androbustness. Ten images with different types of 1D histogram (including unimodal, bimodaland multimodal), contents and sizes are used. They are Brain (414×360), Cameraman (256×256), Airplane (512×512), Boat (512×512), Milkdrop (512×512), Woman (512 & times; 512), House (414×360), Money (500×1192), Lena (414×360), Goldhill (414×360), shown in Fig. 3. In order to further prove the effectiveness of the proposed method, Abutaleb’s2D-KSW [5], Xiao’s GLSC-KSW [6], Yimit’s 2D-D-KSW [7], Xiao’s GLGM-KSW [8] areemployed for comparison.
Fig. 3. Ten original images
3.1 Results
It is important to select appropriate parameters in experiment. K is the number of Gabor filter, its recommended value is 20 (same as m=4 , n=5 ). W is the neighborhood size of maximum neighborhoods convolution operation, in this paper, different neighborhood size\((3 \times 3,5 \times 5,7 \times 7 \text { and } 9 \times 9)\) are tested on the images. The thresholds and segmentationimages of the proposed method in different neighborhood size are shown in Table 1 and Fig. 4.
Table 1. The thresholds of the proposed method in different neighborhood size
Fig. 4. Segmentation image of different neighborhood size, from left to right: original images, \(3 \times 3,5 \times 5,7 \times 7 \text { and } 9 \times 9\)
As shown in Fig. 4, it can be observed that the segmentation results of differentneighborhood size are similar. In this paper, the neighborhood size of 7 × 7 is utilized tosegment 10 images. And in order to demonstrate the effectiveness of the proposed method, the segmentation results of Abutaleb’s 2D-KSW, Xiao’s GLSC-KSW, Yimit’s 2D-D-KSW, Xiao’s GLGM-KSW and the proposed method are compared. The thresholds of differentmethods are shown in Table 2 and the segmentation images shown in Fig. 4.
Table 2. The threshold results of different approaches
Fig. 5. Thresholding results of test images using different methods. From left to right: original images, the results obtained by 2D KSW, GLSC KSW, 2D-D KSW, GLGM KSW and our approach.
As shown in Fig. 5 it can be observed that:
For Brain image, 2D KSW, GLSC KSW and 2D-D KSW can all split out the gray matter of the brain image, but these methods can not deal well with the dark information in image well. While GLGM-KSW and the proposed method can not only split out the gray matter, but also segment dark information.
For Cameraman and Money image, the 2D-D KSW and 2D KSW have a lot of blackshadows effect which does not exist in the original image. While the GLSC KSW, GLGMKSW and the proposed method can yield better results.
For Airplane and Boat image, 2D-D KSW shows the black shadows. The results of otheralgorithms seem to be similar. While if we observe the segmentation result carefully, it can be found that the proposed method may indicate more details on the Boat image.
For Milkdrop image, only the proposed method can segment it effectively. Otherapproaches can not split well, especially GLGM KSW, which can not distinguish the background and drop of milk.
For Woman image, all the methods except GLGM KSW can get good result.
For House image, GLGM KSW and 2D-D KSW can only extract the contour of target, but can not handle the details in the image well. While 2D KSW, GLSC KSW and the proposed method can distinguish different image components effectively, and get satisfied results.
For Lena image, only 2D-D KSW shows some black shadows, other approaches have better similar segmentation results without black shadows.
For Goldhill image, all approaches show similar results. However, the results of the proposed method and GLSC KSW present better details in the sky of the image.
From the above experiment, we can see that, the proposed method may comprehensively reach good segmentation results.
3.2 Discussion
To quantitatively judge the quality of several thresholding-based segmentation algorithms, the uniformity measure [12] and the feature similarity [13] are used to further quantify the experimental results of different segmentation methods.
The uniformity measure may have a good judgment on the quality of the threshold image in the region consistency. It is extensively utilized in a lot of literatures and is given as:
\(u=1-2 * p * \frac{\sum_{j=0}^{p} \sum_{j \in R_{j}}\left(f_{i}-u_{j}\right)^{2}}{N^{*}\left(f_{\max }-f_{\min }\right)}\) (17)
Where N is the number of image pixels, p is number of threshold, fi is the graylevel of pixel i , Rj represents jth segmented region, uj is the mean gray value of the pixels in jth region, fmax is the maximum gray level of pixels in the given image, fmin is theminimum gray level of pixels in the given image. The uniformity measure u has a range in [0, 1]. The value of u is closer to 1, that indicates the better uniformity in the segmented image and the better segmentation result is.
Feature similarity [14] is used to calculate the similarity of two images from the visual features of texture, shape and space position. The concrete formula is as follow:
\(F S I M=\frac{\sum_{X \in \Omega} S_{L}(X) P C_{m}(X)}{\sum_{X \in \Omega} P C_{m}(X)}\) (18)
Where
\(\begin{aligned} &S_{L}(X)=S_{P C}(X) S_{G}(X)\\ &S_{P C}(X)=\frac{2 P C_{1}(X) P C_{2}(X)+T_{1}}{P C_{1}^{2}(X)+P C_{2}^{2}(X)+T_{1}}\\ &S_{G}=\frac{2 G_{1}(X) G_{2}(X)+T_{2}}{G_{1}^{2}(X)+G_{2}^{2}(X)+T_{2}} \end{aligned}\) (19)
The Ω in Eq 18 represents the whole space of image. T1 and T2 are constants. Here, T1=0.85,T2=160 [13] .G represents the gradient of image, defined as below:
\(G=\sqrt{G_{X}^{2}+G_{y}^{2}}\) (20)
PC represents phase consistency, defined as below:
\(P C(X)=\frac{E(X)}{\left(\varepsilon+\sum n A_{n}(X)\right)}\) (21)
Where the \(A_{n}(X)\) represents n order amplitude, \(E(X)\) represents n order responsevector level at position X . ε is a small positive constant. The higher the value of featuresimilarity means the better the segmentation result.
Table 3 and Table 4 show the uniformity measure and the feature similarity of differentmethods respectively. \(\bar{\omega}_{1} \text { and } \bar{\omega}_{2}\) represent the average uniformity measure and featuresimilarity.
Table 3. Uniformity measure of different methods
Table 4. Feature similarity of different methods
According to Table 3 and Table 4, we can find same clues:
For Milkdrop image, other methods may not split it well, while only the proposed approach presents a better result, which means Gabor histogram having an advantage overthe images that the contour information is not very obvious.
For House image, GLGM-KSW shows the best uniformity measure value, while the proposed method indicates the best feature similarity. This result is reasonable, because the evaluation of the degree of uniformity measurement and feature similarity are the differentaspects of the evaluation. Uniformity measure focuses on the consistency of the threshold, and the feature similarity is committed to the texture, shape and spatial location and othervisual features to evaluate the quality of image.
GLGM-KSW presents a better result on Brain and Cameraman. However, this method relies too much on the contour information of the image. Once the contour information is not very obvious, the segmentation result is not well, such as the results of Milkdrop and Womanimages.
In most cases, 2D-D-KSW relatively shows poor segmentation results. It has a worstuniformity measure value (0.9508) and feature similarity value (0.5668) for the images, because it does not use the simple gradient direction information to distinguish the differentinformation of the image. GLSC-KSW performs better than 2D-KSW, because the GLSChistogram stresses the edge information, while 2D histogram ignores the side of the diagonalinformation, which may lose some useful information.
The proposed method exhibits better results in most cases. In addition, it reveals the bestaverage value of uniformity measure (0.9738) and feature similarity (0.6693), whichindicates the proposed has a better effectiveness and robustness.
4. Conclusion
In this paper, a new Gabor histogram is constructed by including the spatial frequency domain information and spatial location information, and the entropic thresholding method based on Gabor histogram is proposed, which can effectively distinguish foreground/background, edge and noise of image. In experiment, 10 images with differenthistogram types are used to demonstrate the performance of the proposed method. The evaluation of visualized and qualitative results shows that the proposed method, compared with other methods, can achieve better results.
References
- F. Nie, P. Zhang, J. Li, et al, "A novel generalized entropy and its application in image thresholding," Signal Processing, vol. 134, no. C, pp. 23-34, 2017. https://doi.org/10.1016/j.sigpro.2016.11.004
- N. Otsu, "Threshold Selection Method from Gray-Level Histograms," Systems Man and Cybernetics IEEE Transactions on, vol. 9, no. 1, pp. 62-66, 1979. https://doi.org/10.1109/TSMC.1979.4310076
- J. Kittler and J. Illingworth, "Minimum error thresholding," Pattern Recognition, vol. 19, no. 1, pp. 41-47, 1986. https://doi.org/10.1016/0031-3203(86)90030-0
- T. Pun, "Entropic thresholding, a new approach," Computer Graphics and Image Processing, vol. 16, no. 3, pp. 210-239, 1981. https://doi.org/10.1016/0146-664X(81)90038-1
- Abutaleb A S, et al, "Automatic thresholding of gray-level pictures using two-dimensional entropy," Compute Vision Graphics and Image Processing, vol. 47, no. 1, pp. 22-32, 1989. https://doi.org/10.1016/0734-189X(89)90051-0
- Y. Xiao, Z. Cao and S. Zhong, "New entropic thresholding approach using gray-level spatial correlation histogram," Optical Engineering, vol. 49, no. 12, pp. 1127-1134, 2010.
- A.Yimit, Y. Hagihara, T. Miyoshi and Y. Hagihara, "2-D direction histogram based entropic thresholding," Neuro computing, vol. 120, no. 10, pp. 287-297, 2013.
- Y. Xiao, Z. Cao and S. Zhong, "Entropic image Thresholding Based on GLGM Histogram," Pattern Recognition Letters, vol. 40, no. 1, pp. 47-55, 2014. https://doi.org/10.1016/j.patrec.2013.12.017
- X. Zheng, H. Ye and Y. Tang, "Image Bi-Level Thresholding Based on Gray Level-Local Variance Histogram," Entropy, vol. 19, no. 5, pp. 191, 2017. https://doi.org/10.3390/e19050191
- Y. D. Zhao, L. P. Zhang and P. X. Li, "A Texture Segmentation Algorithm Based on Directional Gabor Filter," Journal of Image and Graphics, vol. 11, no. 4, pp. 504-510, 2006. https://doi.org/10.3969/j.issn.1006-8961.2006.04.010
- M. Haghighat, S. Zonouz and M.A. Mottaleb, "CloudID: Trustworthy cloud-based and cross-enterprise biometric identification," Expert Systems with Applications, vol. 42, no. 21, pp. 7905-7916, 2015. https://doi.org/10.1016/j.eswa.2015.06.025
- S. Manikanda, K. Ramar, M. W. Iruthayarajan, et al, "Multilevel thresholding for segmentation of medical brain images using real coded genetic algorithm," Measurement, vol. 47, no. 1, pp. 558-568, 2014. https://doi.org/10.1016/j.measurement.2013.09.031
- A. K. Bhandari and K. S. Vineet, "Cuckoo search algorithm and wind driven optimization based study of satellite image segmentation for multilevel thresholding using Kapur's entropy," Expert Systems with Applications, vol. 41, no. 7, pp. 3538-3560, 2014. https://doi.org/10.1016/j.eswa.2013.10.059
- Z. Lin, Z. Lei, et al, "FSIM: A feature similarity index for image quality assessment," IEEE Transactions on Image Processing, vol. 20, no. 8, pp. 2378-2386, 2011. https://doi.org/10.1109/TIP.2011.2109730