A Modified Gray level Co-occurrence Matrix based ... - Science Direct

0 downloads 0 Views 421KB Size Report
a,bImage Analysis & Computer Vision Lab., Department of ETC, C. V. ... Object background classification is the basic problem of object tracking in the computer vision ..... [1] Jain A. K. “Fundamentals of Digital Image Processing”, Prentice Hall, ...
Procedia Engineering

Available online at www.sciencedirect.com

Procedia Engineering 00 (2011) 000–000 Procedia Engineering 30 (2012) 85 – 91

www.elsevier.com/locate/procedia

International Conference on Communication Technology and System Design 2011

A Modified Gray level Co-occurrence Matrix based Thresholding for Object Background Classification A.Dasha, P.Kanungoa*,B.P.Mohantyb b* a,b

Image Analysis & Computer Vision Lab., Department of ETC, C. V. Raman College of Engineering, Bhubaneswar, 752054,India b

Department of EIE, ITER, S’O’A University,Bhubaneswar-751030, India

Abstract Object background classification is the basic problem of object tracking in the computer vision area. Thresholding is the simplest approach to separate object from the background. The solutions using thresholding techniques become more complex when the image is blurred or low contrast. In this paper, we proposed a modified co-occurrence matrix for extraction of the edge information to detect the threshold for object and background classification in a low contrast or blurred image. The proposed approach is tested with standard test images which are of low contrast or blurred to different degree to validate the efficiency of our proposed method.

© 2011 Published by Elsevier Ltd. Selection and/or peer-review under responsibility of ICCTSD 2011 Open access under CC BY-NC-ND license.

Keywords: Gray level Co-occurrence matrix; Thresholding; Segmentation; Misclassification Error.

1. Introduction Segmentation is the low level vision solution which helps in separating object from the background. The efficiency of such solution depends on the output of segmentation process. Among all the available segmentation methods [1-3] global thresholding is the simplest and fastest method. The thresholding algorithms are broadly classified as region based and edge based approaches. In region based approach the threshold is detected based on the information extracted from the whole image by means of image histogram, while edge based technique largely depends on the attributes along the contour between the object and the background. However theses global thresholding approaches failed to provide better

* P.Kanungo. Tel.: +91-9437224153; fax: +91-674-2460043. E-mail address: [email protected]. 88

1877-7058 © 2011 Published by Elsevier Ltd. Open access under CC BY-NC-ND license. doi:10.1016/j.proeng.2012.01.837

86

A. Dash et al. / Procedia Engineering 30 (2012) 85 – 91 A.Dash.,P.Kanungo,B.P.Mohanty/ Procedia Engineering 00 (2011) 000–000

segmented result in terms of percentage of misclassification error (PME) in case of low objectbackground contrasts and blurred boundaries. The thresholding approach proposed by Otsu [4] is the land mark for object background classification. Otsu suggested an approach by minimizing the weighted sum of within class variance of the foreground and background pixels to establish an optimum threshold. Minimization of within class variance is equivalent to maximization of between class variance of two data sets. The objective function formulated by Otsu is still remains one of the most referred thresholding method. Kittler et al. [5] selected a threshold value that minimized misclassification error in the Bayes sense. Kapur et al.[6] modified the approach proposed by Pun[7] which is based on entropy criterion. Arora et al. [8] proposed a novel algorithm for segmentation of an image into multiple levels using its mean and variance starting from the extreme pixel values at both end of the histogram plot. Xiao et al. [9] refines the gray level spatial correlation (GLSC) histogram by embedding human visual nonlinearity characteristics (HVNC) into GLSC histogram. In their article [9] they employed the type-2 fuzzy set and consequently transferred the type-2 fuzzy set to type-1 fuzzy set for finding the optimal threshold by minimizing the fuzziness in the type-1 fuzzy set after an exhaustive search. Cheng et al. [10] proposed a 2D homogeneity histogram to evaluate the optimum threshold using the maximum fuzzy entropic criterion. All these methods fail to produce good results in terms of PME when the image is blurred or having non-uniform lightening condition or complex background case. For the edge based thresholding techniques the idea of applying the boundary based attributes is based on the fact that discriminate features exists at the boundary between the object and the background [11]. Althouse et al. [12] proposed an edge based thresholding method based on the co-occurrence matrix where distribution of gray scale transition together with the edge information is embedded in the matrix. Several types of entropies such as global, local, joint and relative entropy can be computed from the cooccurrence matrix to determine the threshold value. The co-occurrence matrix based thresholding approaches are simple and efficient because we can extract a lot of features from the co-occurrence matrix for the evaluation of the global threshold. The co-occurrence matrix which is used as feature space, carries the image, provides the information of a pixel and its neighbouring pixels. This method gives satisfactory result when the number of pixels, in each class is close to each other. All these methods discussed above failed to produce good results in case of low object-background contrasts and blurred boundaries. The co-occurrence matrix has problem of distinguishing noise pixels from image pixels and object edge pixels from interior pixels. However most of the co-occurrence based techniques considered only the gray value of two neighbouring pixels. Feghi et al.[13] proposed an improved co-occurrence matrix as a feature space for relative entropy based image thresholding by considering the average gray value of the adjacent column and average gray value of adjacent row. Motivated from the Feghi et al.’s work we proposed a modified co-occurrence matrix based on the average of all the pixels in the neighbourhood and the pixels under consideration. Due to the averaging value of all the pixels in the neighbourhood this feature space is capable to handle the noisy image easily. We have applied the Mokji et al.’s [14] adaptive thresholding based on co-occurrence matrix edge information to detect the optimum threshold. 2. Gray level Co-occurrence Matrix Given an image f ( x. y ) of size M N with L gray levels. Thus the gray level co-occurrence matrix (GLCM) of image which carries information about the transition of intensities between adjacent pixels is defined as

C [cij ]L

L

(1) 89

A.Dash.,P.Kanungo,B.P.Mohanty/ Procedia Engineering 00 (2011) 000–000 A. Dash et al. / Procedia Engineering 30 (2012) 85 – 91

i and column j of co-occurrence matrix C and is defined

Where cij is the element of row M 1N 1

as: cij

x 0y 0

87

f ( x, y )

( x, y ) where, ( x, y )

1 0

if

i, f ( x, y 1) and / or f ( x, y ) i, f ( x 1, y ) otherwise

j j

(2)

By normalizing the total number of transitions in the C matrix, the transition probability from i to j gray level is obtained. The normalized co-occurrence matrix CN is given as CN

[cij ]L L L 1L 1

[ pij ]L

(3)

L

cij

i 0 j 0

Where, pij represents the transition probability from i to j gray level. 3. The Proposed Modified Gray level Co-occurrence Matrix The construction of GLCM above considers only two neighbouring points. To increase the spatial information between the image pixel and its neighbourhood we consider all the pixels in a 3×3 window, and we named it as Modified Gray Level Co-occurrence Matrix (MGLCM). Therefore MGLCM contains information regarding the transition of intensities between an information pixel and the average of all the pixels in a 3×3 neighbourhood of the information pixel. If f ( x, y) is an image of M N dimension having L Gray levels, then the MGLCM is defined as CM

cM ij

Where, cM ij

M 1N 1

Where, g x, y

(4)

L L

x, y and

( x, y)

x 0y 0

1 if f ( x, y) i, g ( x, y) 0 otherwise

1 f x, y 1 f x 1, y 1 10 f x 1, y 1 f x 1, y

j

f x 1, y f x 1, y 1 f x 1, y 1 2 f x, y

(5) f x, y 1

(6)

In (6), g x, y is the average of the neighbouring pixels with a weightage of two for the central pixel. Our proposed MGLCM is the co-occurrence of the image pixel and the average gray level of the window centred at the image pixel which also helps in noise smoothing because of the averaging feature. 3.1. The Thresholding Algorithm The well known thresholding algorithms use the GLCM quadrant to detect the threshold [12,13]. In all these approaches, a threshold value T is chosen and mapped on to the GLCM. This threshold value T partitions the GLCM into four quadrants as shown in Fig.1. Quadrant A represents gray level transition within the object (dark) while quadrant D represents gray level transition within the background (bright). The gray level transition between the object and the background or across the object’s boundary is placed 90

88

A. Dash et al. / Procedia Engineering 30 (2012) 85 –000–000 91 A.Dash.,P.Kanungo,B.P.Mohanty/ Procedia Engineering 00 (2011)

in quadrant B and quadrant C. These four regions can be further grouped in to two classes, referred as local quadrant (quadrant A and D ) and joint quadrant (quadrant B and C). The computation to find the optimum threshold using this 2-D feature space is too complex [13]. To reduce the computational complexity and to optimize the threshold, we use the adaptive thresholding approach proposed by Mokji et al. [13] for our proposed MGLCM for binarization of the input image. In this approach, information based on edge magnitude, which is found in MGLCM contrast quantification is applied for the threshold detection as follows. T

1

l k

Where,

m

l

m 0n 0

l k

l

n 2

C M m, n

(7)

C M m, n , l=255 and k, m and n are integers

(8)

m 0n m k

Where, CM m, n gives information on the frequency of the pixel pair and on the other hand, the edge component is represented by the range of the two level summation operations. This summation range forces the equation to compute the threshold value within a specific area in MGLCM. The specific area is restricted by n m k . Hence the computation only involves pixel pair with the edge magnitude greater than or equal to k. 0, 0

255 A

0, 0

255

n m k

B M

C

D 255

255 Fig. 1

Fig. 2

Fig1-GLCM quadrants,Fig2-Threshold computation Area

Fig.2 illustrates the computation area which is represented by shaded area. By choosing a right k value, the computation area will be on the objects boundary area. This area is differs from the GLCM quadrants as shown in Fig.1 where the object’s boundary area is placed in quadrant B and C. But in this method the threshold is computed based on edge magnitude rather than separating it into four different rectangular quadrants as in the GLCM quadrants. The computational area is only assigned to the upper triangle of the MGLCM although area with edge magnitude greater than or equal to k exits at the lower triangle. Due to this reason the computation complexity reduced as both areas at the upper and lower triangles assume similar values because of the symmetrical feature of the MGLCM. In our method we considered k=0 i.e the upper triangle is only used for threshold evaluation. Hence the (7) and (8) is modified to provide optimum threshold as T

1

Where, l

l

l

m 0n 0 l

m

n 2

C M m, n

CM m, n

m 0n m

(9) (10) 91

89

A. Dash et al. / Procedia Engineering 30 (2012) 00 85 (2011) – 91 000–000 A.Dash.,P.Kanungo,B.P.Mohanty/ Procedia Engineering

4. Result and Discussions In our simulation, four different types of images with different degree of contrast and blurring have been considered to validate our proposed approach which is shown in fig. 3. (a), (b), (c), and (d). Fig3.(a) is a lowly lighted image and hence visibly blurred, fig 3(b) and (c) are very high and very low contrast images respectively, and fig3(d) is a blurred image. We manually constructed the ground truth (GT) images of these images manually and show it in fig 4. (a), (b),(c) and (d) respectively. These ground truth images are also used for the calculation of the misclassification error (ME) results in different thresholding approaches. The percentage of misclassification error (PME) is calculated as follows; PME

1

Bo

Bk

Fo

Bo

Fo

Fk

100

(11)

Where, Bo and Fo denote the background and foreground of the original (GT) images respectively, Bk and Fk denote the background and foreground area pixels in the test (segmented result) images respectively, and is the cardinality of the set. The PME varies from 0 for a perfectly classified image to 100 for a fully imperfectly classified image. To validate our approach, the segmented results are compared with those of Otsu’s [4] , Kapur’s[6] and Mokji’s [14] The threshold values (T) and the PMEs obtained in different approaches are tabulated in Table-1. The segmented results obtained using Otsu’s approach is shown in Fig. 5 (a), (b), (c) and (d) respectively. From Table-1 we found that the threshold values detected by Otsu’s approach are 196, 2, 96, and 32 for the image in Fig. 3 (a), (b), (c), and (d) respectively. The evaluated PMEs from Table-1 are 25.17,7.07,16.92, and 23.55 respectively. The segmented results shown in Fig. 6 (a), (b), (c), and (d) are obtained using Kapur’s approach. The thresholds detected for these four test images are 217,56,114, and 131. Whereas the PMEs for Kapur’s approached based segmented results are 52.05,11.27,35.85, and 20.13 respectively. The results presented in Fig.7 are the segmented results images in Fig. 3 using Mokji’s approach with p=0. The threshold values as per Table-1 are 209,14, 108, and 40 and the PMEs are 27.34, 3.87,16.15, and 6.20. The results reported in Fig.8 (a), (b),(c) and (d) are the results obtained by our proposed MGLCM based adaptive thresholding. The results are visually much closer to the ground truth images shown in Fig.4. The thresholds obtained by our approach are 205,10,106, and 39 and the corresponding PMEs are 13.77, 3.27, 11.55, and 6.18. The threshold values detected by our approach for these four images are widely differs from the Ostu’s and Kapur’s approach whereas closer to the Mokji’s approach. In terms of PME for all the images under consideration our proposed approach produced the lowest PME which is reported in Table-1. Hence our proposed MGLCM based thresholding approach outperforms the other three approaches considered in terms of visual perception as well as in PME. 5. Conclusion Thresholding is the simplest and fastest method of background and foreground classification techniques for real-time implementation. The proposed modified gray level co-occurrence matrix (MGLCM) based thresholding scheme for optimal threshold detection has an edge over all the methods irrespective of the degree of contrast and blurriness. Our approach produced the optimum threshold in low PME sense. The time complexity of GLCM based thresholding approach is reduced by half by considering the only upper triangle of the MGLCM. The PME can further reduced by appropriate estimation of the parameter k which will also reduce the size of the upper triangle for the threshold evaluation. 92

90

Images

A. Dash et al. / Procedia Engineering 30 (2012) 85 – 000–000 91 A.Dash.,P.Kanungo,B.P.Mohanty/ Procedia Engineering 00 (2011)

Otsu’s Approach

Kapur’s Approach

Mokji’s Approach

Proposed Approach

(a)

(b) (c) Fig 3: Original blured and low lighted Images (a) Image1, (b)Image2, (c)Image3, (d)image4

(d)

(a)

(b) (c) Fig. 4: Manually generated Ground trouth of the respective original images in Fig.3

(d)

(a)

(b) (c) Fig. 5: Results using Otsu’s approach

(d)

(a)

(b) (c) Fig. 6: Results using Kapur’s Approach

(d)

(a)

(b) (c) Fig. 7: Results using Mokji’s Approach

(d)

(a)

(b) (c) Fig. 8: Results using our Proposed Approach

(d)

93

91

A. Dash et al. / Procedia Engineering 30 (2012) 85 – 91 A.Dash.,P.Kanungo,B.P.Mohanty/ Procedia Engineering 00 (2011) 000–000

Image1 Image2 Image3 Image4

T 196 002 096 032

PME 25.17 07.07 16.92 23.55

T 217 056 114 131

PME 52.05 11.27 35.85 20.13

T 209 014 108 040

PME 27.34 03.87 16.15 06.29

T 205 010 106 039

PME 13.77 03.27 11.25 06.18

Table.1: Detected threshold value and the misclassification error for different Approaches

Acknowledgements The research work is a part of the AICTE sponsored RPS project No:8023/BOR/RID/RPS-103/2008/09 and Image Analysis and computer vision Lab, Department of Electronics and Telecommunication Engg., C. V. Raman College of Engineering, Bhubaneswar, Orissa-752054. References [1] Jain A. K. “Fundamentals of Digital Image Processing”, Prentice Hall, 2010. [2] Sahoo P.K, Soltani S, Wong A.K.C. “A survey of thresholding techniques”, Computer Vision, Graphics and Image Processing 1988;41: 2, p. 233 – 260. [3] Sezgin M , Sankur B. “Survey over image thresholding techniques and quantitative performance evaluation”, Journal of Electronic Imaging 2004; 1:1, p. 146–165 [4] Otsu N., “A threshold selection method from gray-level histogram”, IEEE Transactions on Systems, Man, and Cybernetics 1976, 9, p. 62-66 [5] Kittler J and Illingworth J., “Minimum error thresholding”, Pattern Recognition, 1986; 19, p. 41-47. [6] Kapur J.N., Sahoo P.K. ,Wong A.K.C. “A new method for gray-level picture thresholding using the entropy of the histogram”, Computer Vision, Graphics and Image Processing ,1985, 29, p. 273-285 [7] Pun T., “Entropic thresholding a new approach”, Signal Processing , 1981;16, p. 210-239 [8] Arora S., Acharya J., Verma A. ,Panigrahi P.K., “Multilevel thresholding for image segmentation through a fast statistical recursive algorithm”, Pattern Recognition Letters 2008, 29:2, p.119-125 [9] Xiao Y.,Cao Z. ,Zhuo W., “Type-2 fuzzy thresholding using GLSC histogram of human visual nonlinearity characteristics”, Optics Express 2011,19:11, p. 10656-10672. [10] Cheng H.D., Guo Y, Zhang Y, “A novel approach to image thresholding based on 2D homogeneity histogram and maximum fuzzy entropy”, New Mathematics and Natural Computation (NMNC), World Scientific Journal 2011;7:1,p.105-133. [11] Chow C.K., Kanek T, “Automatic boundary detection of the left – ventricle from cineangiograms”, Computers and biomedical research an international journal 1972, 5:4, p. 388 – 410. [12] Althouse M.L.G.,Chang C.I., “Image segmentation by local entropy methods”, Proceedings of the International Conference on Image Processing 1995; 3, p. 1-64. [13] Feghi E.L.,Adem N.,Sid-Ahmed M.A. ,Ahmadi M., “Improved co-occurrence matrix as a feature space for relative entropy – based image thresholding”’, Computer Graphics, Imaging & Visualisation 2007,p.314-320. [14] Mokji M.M., Bakar S.A.R.A., “Adaptive thresholding based on co-occurrence matrix edge information”, Journal of computers 2007, 2:8, p. 44–52.

94

Suggest Documents