OSA's Digital Library

Journal of the Optical Society of America A

Journal of the Optical Society of America A

| OPTICS, IMAGE SCIENCE, AND VISION

  • Editor: Stephen A. Burns
  • Vol. 26, Iss. 9 — Sep. 1, 2009
  • pp: 1967–1976
« Show journal navigation

Unsupervised novelty detection using Gabor filters for defect segmentation in textures

Miquel Ralló, María S. Millán, and Jaume Escofet  »View Author Affiliations


JOSA A, Vol. 26, Issue 9, pp. 1967-1976 (2009)
http://dx.doi.org/10.1364/JOSAA.26.001967


View Full Text Article

Acrobat PDF (1233 KB)





Browse Journals / Lookup Meetings

Browse by Journal and Year


   


Lookup Conference Papers

Close Browse Journals / Lookup Meetings

Article Tools

Share
Citations

Abstract

Gabor wavelets are applied to develop an unsupervised novelty method for defect detection and segmentation that is fully automatic and free of any adjustable parameter. The algorithm combines the Gabor analysis of the sample image with a statistical analysis of the wavelet coefficients corresponding to each detail. The statistical distribution of the coefficients corresponding to the defect-free background texture is calculated from the coefficient’s distribution of the sample under inspection. Once the background texture features are estimated, a threshold is automatically fixed and applied to all the details, whose information is merged into a single binary output image in which the defect appears segmented from the background. The method is applicable to random, nonperiodic, and periodic textures. Since all the information to inspect a sample is obtained from the sample itself, the method is proof against heterogeneities between different samples of the material, in-plane positioning errors, scale variations, and lack of homogeneous illumination. Experimental results are presented. Some results are compared with other unsupervised methods designed for defect segmentation in periodic textures.

© 2009 Optical Society of America

1. INTRODUCTION

Regarding the latter case, Gabor filters and wavelet transforms have been widely used (see, for instance, [2

2. J. Escofet, R. Navarro, M. S. Millán, and J. Pladellorens, “Detection of local defects in textile webs using Gabor filters,” Opt. Eng. (Bellingham) 37, 2297–2307 (1998). [CrossRef]

, 3

3. A. Bodnarova, M. Bennamoun, and S. Latham, “Optimal Gabor filters for textile flaw detection,” Pattern Recogn. 35, 2973–2991 (2002). [CrossRef]

, 4

4. Z. Hou and J. M. Parker, “Texture defect detection using support vector machines with adaptative gabor wavelet features,” in Proceedings of IEEE Workshop on Applications of Computer Vision (IEEE, 2005), pp. 275–280.

, 5

5. K. L. Mak and P. Peng, “An automated inspection system for textile fabrics based on Gabor filters,” Rob. Comput.-Integr. Manufact. 24, 359–369 (2008). [CrossRef]

, 6

6. H. Sari-Sarraf and J. Goddard, “Vision systems for on-loom fabric inspection,” IEEE Trans. Ind. Appl. 35, 1252–1259 (1999). [CrossRef]

, 7

7. M. C. Hu and I. S. Tsai, “Fabric inspection based on best wavelet packet bases,” Text. Res. J. 70, 662–670 (2000). [CrossRef]

, 8

8. S. C. Kim and T. J. Kang, “Automated defect detection system using wavelet packet frame and Gaussian mixture model,” J. Opt. Soc. Am. A 23, 2690–2701 (2006). [CrossRef]

, 9

9. F. Truchetet and O. Laligant, “A review on industrial applications of wavelet and multiresolution based signal-image processing,” J. Electron. Imaging 17, 031102 (2008). [CrossRef]

]) and efficiently combined with multiresolution decomposition schemes to detect and segment flaws in textured surfaces. Many papers report a variety of applications to fabric inspection in the textile industry [2

2. J. Escofet, R. Navarro, M. S. Millán, and J. Pladellorens, “Detection of local defects in textile webs using Gabor filters,” Opt. Eng. (Bellingham) 37, 2297–2307 (1998). [CrossRef]

, 3

3. A. Bodnarova, M. Bennamoun, and S. Latham, “Optimal Gabor filters for textile flaw detection,” Pattern Recogn. 35, 2973–2991 (2002). [CrossRef]

, 5

5. K. L. Mak and P. Peng, “An automated inspection system for textile fabrics based on Gabor filters,” Rob. Comput.-Integr. Manufact. 24, 359–369 (2008). [CrossRef]

, 6

6. H. Sari-Sarraf and J. Goddard, “Vision systems for on-loom fabric inspection,” IEEE Trans. Ind. Appl. 35, 1252–1259 (1999). [CrossRef]

, 7

7. M. C. Hu and I. S. Tsai, “Fabric inspection based on best wavelet packet bases,” Text. Res. J. 70, 662–670 (2000). [CrossRef]

, 8

8. S. C. Kim and T. J. Kang, “Automated defect detection system using wavelet packet frame and Gaussian mixture model,” J. Opt. Soc. Am. A 23, 2690–2701 (2006). [CrossRef]

, 9

9. F. Truchetet and O. Laligant, “A review on industrial applications of wavelet and multiresolution based signal-image processing,” J. Electron. Imaging 17, 031102 (2008). [CrossRef]

].

A fault or defect can be seen as a region where the homogeneity of the background texture is locally broken. Inspection may involve different levels of blob (defect) analysis which can be ordered as follows, according to the increasing amount of knowledge demanded: detection, localization, segmentation, and classification. Some defect detection algorithms are designed assuming a training stage of the machine vision system. During training, the system learns all possible object classes whose data are to be encountered when testing. But this is difficult to ensure in many industrial inspection processes either because abnormalities are rare or because there may be no complete data that describe all possible faults and only defect-free samples can be analyzed. For this reason, it is important for a vision system to be able to identify new or unknown data that was not available at the time of training, and in consequence, to discriminate between known and unknown object information during testing. This challenging task is called novelty detection [10

10. M. Markou and S. Singh, “Novelty detection: a review-part 1: statistical approaches,” Signal Process. 83, 2481–2497 (2003). [CrossRef]

].

Similarly, supervised defect detection algorithms rely on the fact that the characteristics of a defect-free region (background) are learned through the presentation of training defect-free templates to the machine vision system. As a result, any part of the test image that might look different from the background is classified as a defect. Supervised approaches provide very good performance when the defect-free background does not change from one image to another. However, when the defect-free background is liable to variability, supervised methods become unreliable, and the system may have to be retrained on a new set of images. As stated by Rohrmus in [11

11. D. R. Rohrmus, “Invariant and adaptive geometrical texture features for defect detection and classification,” Pattern Recogn. 38, 1546–1556 (2005). [CrossRef]

], p. 1547, “the key to inspection robustness is invariance against critical image distortions: rotation and translations (Euclidean motion), the scaling, and inhomogeneous illumination conditions,” as well as other possible changes in the imaging system occurring between the acquisition of the defect-free template and the test sample. In such situations, unsupervised defect detection algorithms that need minimal knowledge of both the defect and the defect-free background are clearly advantageous. Recently, some unsupervised methods have been proposed for defect detection in textured materials [8

8. S. C. Kim and T. J. Kang, “Automated defect detection system using wavelet packet frame and Gaussian mixture model,” J. Opt. Soc. Am. A 23, 2690–2701 (2006). [CrossRef]

, 12

12. D. M. Tsai and T. Y. Huang, “Automated surface inspection for statistical textures,” Image Vis. Comput. 21, 302–323 (2003). [CrossRef]

, 13

13. A. Abouelela, H. M. Abbas, H. Eldeeb, A. A. Wahdan, and S. M. Nassar, “Automated vision system for localizing structural defects in textile fabrics,” Pattern Recogn. Lett. 26, 1435–1443 (2005). [CrossRef]

, 14

14. M. Ralló, M. S. Millán, and J. Escofet, “Referenceless segmentation of flaws in woven fabrics,” Appl. Opt. 46, 6688–6699 (2007). [CrossRef] [PubMed]

, 15

15. A. Gururajan, H. Sari-Sarraf, and E. F. Hequet, “Statistical approach to unsupervised defect detection and multiscale localization in two-texture images,” Opt. Eng. (Bellingham) 47, 027202 (2008). [CrossRef]

], mainly textile [8

8. S. C. Kim and T. J. Kang, “Automated defect detection system using wavelet packet frame and Gaussian mixture model,” J. Opt. Soc. Am. A 23, 2690–2701 (2006). [CrossRef]

, 13

13. A. Abouelela, H. M. Abbas, H. Eldeeb, A. A. Wahdan, and S. M. Nassar, “Automated vision system for localizing structural defects in textile fabrics,” Pattern Recogn. Lett. 26, 1435–1443 (2005). [CrossRef]

, 14

14. M. Ralló, M. S. Millán, and J. Escofet, “Referenceless segmentation of flaws in woven fabrics,” Appl. Opt. 46, 6688–6699 (2007). [CrossRef] [PubMed]

, 15

15. A. Gururajan, H. Sari-Sarraf, and E. F. Hequet, “Statistical approach to unsupervised defect detection and multiscale localization in two-texture images,” Opt. Eng. (Bellingham) 47, 027202 (2008). [CrossRef]

]. Some methods use a statistical-based approach [8

8. S. C. Kim and T. J. Kang, “Automated defect detection system using wavelet packet frame and Gaussian mixture model,” J. Opt. Soc. Am. A 23, 2690–2701 (2006). [CrossRef]

, 13

13. A. Abouelela, H. M. Abbas, H. Eldeeb, A. A. Wahdan, and S. M. Nassar, “Automated vision system for localizing structural defects in textile fabrics,” Pattern Recogn. Lett. 26, 1435–1443 (2005). [CrossRef]

, 15

15. A. Gururajan, H. Sari-Sarraf, and E. F. Hequet, “Statistical approach to unsupervised defect detection and multiscale localization in two-texture images,” Opt. Eng. (Bellingham) 47, 027202 (2008). [CrossRef]

], while others use structural and filter-based approaches in the Fourier domain [12

12. D. M. Tsai and T. Y. Huang, “Automated surface inspection for statistical textures,” Image Vis. Comput. 21, 302–323 (2003). [CrossRef]

, 14

14. M. Ralló, M. S. Millán, and J. Escofet, “Referenceless segmentation of flaws in woven fabrics,” Appl. Opt. 46, 6688–6699 (2007). [CrossRef] [PubMed]

]. All of them assume that the local defect occupies a relatively small area in the defect-free background and extract the information about both the background and the defect from the single image under inspection.

Abouelela et al. [13

13. A. Abouelela, H. M. Abbas, H. Eldeeb, A. A. Wahdan, and S. M. Nassar, “Automated vision system for localizing structural defects in textile fabrics,” Pattern Recogn. Lett. 26, 1435–1443 (2005). [CrossRef]

] analyze textured materials consisting of uniformly gray, plain fabric samples illuminated by an infrared source. Infrared imaging has been demonstrated to be useful to reduce variances due to dyed color patterns that could interfere with variances due to possible structural defects of the weave pattern [16

16. M. S. Millán and J. Escofet, “Fabric inspection by near-infrared machine vision,” Opt. Lett. 29, 1440–1442 (2004). [CrossRef] [PubMed]

]. In [8

8. S. C. Kim and T. J. Kang, “Automated defect detection system using wavelet packet frame and Gaussian mixture model,” J. Opt. Soc. Am. A 23, 2690–2701 (2006). [CrossRef]

, 13

13. A. Abouelela, H. M. Abbas, H. Eldeeb, A. A. Wahdan, and S. M. Nassar, “Automated vision system for localizing structural defects in textile fabrics,” Pattern Recogn. Lett. 26, 1435–1443 (2005). [CrossRef]

], the input image is subdivided into blocks, assuming that the background fabric texture occupies the larger part of the image to be inspected and only a few blocks may correspond to defects. On the one hand, block size has to be small enough to be sensitive to the variations caused by possible defects. On the other hand, block size has to be large enough to be insensitive to the deterministic variations of the woven structure and minute unimportant fluctuations. The algorithms require fixing a number of parameters, such as the block sizes and thresholds, which limits their applicability. Kim and Kang [8

8. S. C. Kim and T. J. Kang, “Automated defect detection system using wavelet packet frame and Gaussian mixture model,” J. Opt. Soc. Am. A 23, 2690–2701 (2006). [CrossRef]

] use Daubechies wavelet packet frames and a Gaussian mixture model, so the applicability of their method is advantageously extended to fabrics with nonuniform color patterns (e.g., warp and weft threads of different color) and defects that alter slightly the mean gray level of the region. These methods, however, would not be sensitive to small defects (in comparison with the subblock size) that could repeat regularly in other subblocks (see, for instance, Fig. 1 ).

The methods proposed in [13

13. A. Abouelela, H. M. Abbas, H. Eldeeb, A. A. Wahdan, and S. M. Nassar, “Automated vision system for localizing structural defects in textile fabrics,” Pattern Recogn. Lett. 26, 1435–1443 (2005). [CrossRef]

, 14

14. M. Ralló, M. S. Millán, and J. Escofet, “Referenceless segmentation of flaws in woven fabrics,” Appl. Opt. 46, 6688–6699 (2007). [CrossRef] [PubMed]

] adopt a global approach based on bandpass filtering the Fourier transform of the sample image. Tsai and Huang deal with statistical textures with isotropic patterns in [12

12. D. M. Tsai and T. Y. Huang, “Automated surface inspection for statistical textures,” Image Vis. Comput. 21, 302–323 (2003). [CrossRef]

]. They apply a suppression mask in the frequency domain, an inverse Fourier transform, and a threshold for image binarization that work well in cases of low complexity. In our prior paper [14

14. M. Ralló, M. S. Millán, and J. Escofet, “Referenceless segmentation of flaws in woven fabrics,” Appl. Opt. 46, 6688–6699 (2007). [CrossRef] [PubMed]

] we proposed a method for unsupervised defect detection in periodic textures. It was based on the structural feature extraction of the weave repeat from the Fourier transform of the sample image. These features were then used to define a set of multiresolution bandpass filters that operated in the frequency domain. The segmentation of the defective area was achieved after inverse Fourier transform, binarization, and merging of the information obtained at different scales. The method was applied to fabrics and demonstrated to be sensitive even to tiny defects (Fig. 1) and to other sorts of defects in a single image. However, it was specifically limited to the inspection of periodic textures.

The method addresses superficial defects that can be imaged by a camera. It is primarily designed to handle grayscale digital images of texture samples; therefore, color defects would be detected only insofar as they were grayscale distinguishable. As we will show for fabric samples made of different color yarns, the performance of the method is not affected by the influence of color. In the case of patterned dyed fabrics and some fuzzy or velvet fabrics, the detection of structural defects can be improved by using near infrared (NIR) imaging [16

16. M. S. Millán and J. Escofet, “Fabric inspection by near-infrared machine vision,” Opt. Lett. 29, 1440–1442 (2004). [CrossRef] [PubMed]

, 17

17. M. S. Millán and J. Escofet, “NIR imaging of non-uniform colored webs: Application to fabric inspection,” Proc. SPIE 5622, 188–193 (2004). [CrossRef]

]. The woven structure of the sample appears enhanced in NIR images and flaw detection becomes less difficult.

The method’s performance is illustrated with a complete step-by-step example consisting of a flawed random texture obtained by producing a numerical local alteration (flaw) on the photographic image of a real sample of rough paper (random texture background). Afterwards, the method is applied to a variety of photographic images such as fabric and paper samples that exhibit either periodic or random texture. For periodic textures, we also compare the results obtained by the method proposed here with those obtained in [14

14. M. Ralló, M. S. Millán, and J. Escofet, “Referenceless segmentation of flaws in woven fabrics,” Appl. Opt. 46, 6688–6699 (2007). [CrossRef] [PubMed]

].

The final use of this method would be its implementation for on-line texture inspection in an industrial setting. The method proposed in this paper is unsupervised, therefore it neither requires any training stage nor is dependent on environmental conditions. In the textile sector, for instance, there are several trade systems for automated defect detection based on image processing techniques: BarcoVision’s Cyclops, Elbit Vision System’s I-Tex, or Zellweger Uster’s Fabriscan, just to mention some of them. But all these fabric inspection systems are based on adaptive, neural networks. They use training sets of samples and, consequently, any variations in the environmental conditions may alter the system response.

2. BACKGROUND: MULTIRESOLUTION ANALYSIS USING GABOR FILTERS

In the wavelet setting, images are decomposed into a low-resolution approximation and a set of details of different orientations and different resolution levels. In this work, a multiresolution analysis of digital images is carried out according to the scheme described in [2

2. J. Escofet, R. Navarro, M. S. Millán, and J. Pladellorens, “Detection of local defects in textile webs using Gabor filters,” Opt. Eng. (Bellingham) 37, 2297–2307 (1998). [CrossRef]

, 19

19. R. Navarro and A. Tabernero, “Gaussian wavelet transform: two alternative fast implementation for images,” Multidimens. Syst. Signal Process. 2, 421–436 (1991). [CrossRef]

] as a log-polar sampling of the frequency spectrum of the image. Details corresponding to four scales and four orientations result from the application of a set of dyadic 4×4 Gabor filters. The Gabor functions can be represented by the continuous expressions
gpq(x,y)=exp[πap2(x2+y2)]exp[i2πfp(xcosθq+ysinθq)],
(1)
where the first factor is a Gaussian envelope whose bandwidth is given by ap and the second factor is a complex sinusoid. The parameters fp=121+p and θq=qπ4 with p,q=1,2,3,4 represent the frequency and the orientation of the pq channel in the frequency domain, respectively. In our dyadic scheme, the highest frequency has been set to half the Nyquist frequency f1=fN2. The rest of the channels are tuned by halving successively the frequency. Their bandwidths are ap=212fp, to optimize the coverage of the frequency domain. Note that the higher the p value, the lower the frequency and, consequently, the resolution of the channel.

The Gabor functions are complex valued. They give rise to two families of real Gabor filters: the filters that take the even (real) part gpqe, and the filters that take the odd (imaginary) part gpqo. In the scheme used in [2

2. J. Escofet, R. Navarro, M. S. Millán, and J. Pladellorens, “Detection of local defects in textile webs using Gabor filters,” Opt. Eng. (Bellingham) 37, 2297–2307 (1998). [CrossRef]

], the complete set of 32 Gabor filters, including both even and odd parities, was considered. However, the results obtained using just one of the two parities frequently suffices for defect detection purposes (see, for instance, Fig. 2 ). When the Gabor filters are applied to a sample image s(x,y) in the spatial domain, the details of the wavelet decomposition are obtained through convolution:
spqe(x,y)=s(x,y)gpqe(x,y),spqo(x,y)=s(x,y)gpqo(x,y),
(2)
with p,q=1,2,3,4. We recall that spqe(x,y) and spqo(x,y) are numbers. It is common practice to denote them the wavelet coefficients of the image point (x,y) at the decomposition level given by p,q.

As described in [19

19. R. Navarro and A. Tabernero, “Gaussian wavelet transform: two alternative fast implementation for images,” Multidimens. Syst. Signal Process. 2, 421–436 (1991). [CrossRef]

], an efficient implementation of Gabor filtering in the spatial domain can be obtained using convolution masks and following a pyramidal algorithm. At the second and subsequent levels of the algorithm, the original image is decimated, having previously been convolved with a low-pass filter to remove the high-frequency terms and to avoid artifacts caused by subsampling (aliasing). In our method, Gabor filters have fixed size kernels of 11×11 because they provide high fidelity approximating the original filters. Taking advantage of the Gabor filter separability, they can be sequentially applied, horizontally (by rows) and vertically (by columns) using kernels of 11×1 on a one-dimensional base, thus maintaining relatively low computational cost [20

20. O. Nestares, R. Navarro, J. Portilla, and A. Tabernero, “Efficient spatial-domain implementation of a multiscale image representation based on Gabor functions,” J. Electron. Imaging 7, 166–173 (1998). [CrossRef]

]. To further simplify the method, only the imaginary part gpqo of Gabor filters will be used in the following sections.

Taking into account the design of the filters, the texture sample should be imaged and digitized so that the grain size is 4  pixels. For instance, in the case of fabrics, samples are captured so that threads are approximately 4  pixels wide.

3. ANALYSIS OF A FLAWED TEXTURE MODEL

Let us consider a digital image of a flawed sample s(x,y). In order to find out how the defect propagates across scales and orientations in the details obtained from Gabor filters, we model this image as the sum (or superposition) of the background defect-free texture t(x,y) and the intensity variations that account for the defective area d(x,y) [14

14. M. Ralló, M. S. Millán, and J. Escofet, “Referenceless segmentation of flaws in woven fabrics,” Appl. Opt. 46, 6688–6699 (2007). [CrossRef] [PubMed]

]. Figure 3 displays an example of such decomposition for a rough paper sample of random texture. The defect image d(x,y) has positive and negative values in general. As it is commonly represented, gray areas correspond to values close to zero, bright areas to positive values, and dark areas to negative values. Assuming exclusively local defects in the sample image, the defect image d(x,y) is equal to zero throughout except in the small area of the flaws. Sharp gradients appear at the edges of the defect area. The rapid variations at these edges give rise to high absolute values of the wavelet coefficients obtained in specific scales and orientations of the decomposition. See, for example in Fig. 4 , the wavelet coefficients s33o, t33o, and d33o yielded by the Gabor wavelet decomposition of the images s(x,y), t(x,y), and d(x,y) of Fig. 3. It is clear from this figure that the distribution of the coefficients over the flawed area is different from the distribution of the coefficients over the regular area corresponding to the background texture. The flawed area in s33o contains both the darkest and the brightest pixels, thus accounting for the coefficients farthest from zero.

We will take advantage of this fact to separate the coefficients of the flawed area from the coefficients of the background texture to segment the defect from the background. If we look at the histograms of the wavelet coefficients of the details s33o and t33o of our example [Figs. 5a, 5b ] we see that they are similar. However, if we look at the magnified versions of those figures [truncated histograms of Figs. 5c, 5d] we note that s33o ranges over a wider domain than t33o. The density distribution of the wavelet coefficients of s33o is the convolution of the density distributions of t33o and d33o. Those few pixels of s33o with extreme coefficients basically correspond to the defect. They are encircled in the tail ends of the truncated s33o histogram [Fig. 5c]. They account for the greater variability of the coefficient distribution in the flawed area than in the rest of the sample.

4. SEGMENTATION

After the Gabor analysis of the sample image, the segmentation of a possible defect can be accomplished in two steps. In the first step, the wavelet coefficients of each spq (details of the decomposition) are classified and those corresponding to a defect area are identified. In the second step, the presumed defects found by this procedure in the details of all scales and orientations (p,q=1,2,3,4) are merged.

In the first step, some statistical considerations concerning the probability distributions of wavelet coefficients are essential. Crouse et al. [21

21. M. S. Crouse, R. D. Nowak, and R. G. Baraniuk, “Wavelet-based statistical signal processing using hidden markov models,” IEEE Trans. Signal Process. 46, 886–902 (1998). [CrossRef]

] developed a hidden Markov model for the wavelet transform that captures complex dependencies between the coefficients and non-Gaussian statistics, yet remains tractable so that they can be applied to real-world problems. To match the non-Gaussian nature of the wavelet coefficients, they modeled the marginal probability of each coefficient as a mixture density with a hidden state variable. To characterize the key dependencies between the wavelet coefficients, more specifically, their similarity due to location closeness or propagation through scales, they introduced Markovian dependencies between the hidden state variables. We consider the simple two-state model that provides satisfactory results in estimation and detection problems. For each detail, the mixture combines two zero-mean normal distributions, one associated with the coefficients of the flawed area with high standard deviation, including the coefficients at the ends (long tails) of the histogram, the other associated with the coefficients corresponding to the regular regions of the signal, with smaller standard deviation. Following the ideas presented in [8

8. S. C. Kim and T. J. Kang, “Automated defect detection system using wavelet packet frame and Gaussian mixture model,” J. Opt. Soc. Am. A 23, 2690–2701 (2006). [CrossRef]

], Kim and Kang have recently used a Gaussian mixture model for texture classification and segmentation of some Brodatz texture images with success [22

22. S. C. Kim and T. J. Kang, “Texture classification and segmentation using wavelet packet frame and Gaussian mixture model,” Pattern Recogn. 40, 1207–1221 (2007). [CrossRef]

].

Based on these works, we model the probability density function of the wavelet coefficients corresponding to a particular scale and orientation p,q as a Gaussian mixture of two zero-mean normal distributions,
fpq(i)=αfpqt(i)+(1α)fpqd(i),
(3)
where the weight α[0,1] and p,q=1,2,3,4. The normal density function associated with the wavelet coefficients of the background texture (fpqt(i) in Eq. (3)) generally shows a distribution concentrated in the region of low values, whereas the normal density function associated with the wavelet coefficients of the defect [fpqd(i) in Eq. (3)] shows a distribution where some coefficients reach high values. For each p,q detail of the wavelet decomposition, two zero-mean normal density distributions N(0,σpqt) and N(0,σpqd), each determined by its corresponding standard deviation σpqt and σpqd, are then introduced. For instance, following our example of Fig. 5, the histogram of s33o can be fitted as the properly weighted addition of two zero-mean normal distributions that have complementary information about background texture and defect (Fig. 6 ). The wavelet coefficients of the regular background texture are under the αfpqt(i) curve, while the wavelet coefficients of the flawed area are under the (1α)fpqd(i) curve.

A reasonably good estimate of the standard deviation σpqt of fpqt(i) can be directly obtained from the coefficients of the sample under inspection spq with p,q=1,2,3,4. However, the simple assumption that σpqt is equal to the standard deviation of the coefficients of spq can be inaccurate. In the standard deviation, the distances from the mean are squared, so on average, large deviations (corresponding to potential defects) are weighted more heavily, and thus outliers in the coefficient set can heavily influence it. For example, it would be biased to higher values in case of inspecting noticeably flawed samples. We recall that no a priori information about the sample or the background texture or the presence or absence of flaws is available. Based on our former work [14

14. M. Ralló, M. S. Millán, and J. Escofet, “Referenceless segmentation of flaws in woven fabrics,” Appl. Opt. 46, 6688–6699 (2007). [CrossRef] [PubMed]

], taking into account the spreading behavior of the defect across scales/orientations and assuming that the defect occupies a relatively small part of the image, it can be said that the vast majority of the coefficients of spq and tpq are similar.

We will use the median absolute deviation (MAD) [23

23. P. J. Huber, Robust Statistics (Wiley, 1981), p. 107.

] of spq because it is a resistant statistical measure of the variability of a sample. MAD first computes the residuals or deviations from the coefficient’s median and second, it takes the median of their absolute values, that is,
MAD{spq}=mediani|spq(i)medianj[spq(j)]|,
(4)
where i and j indicate points represented by their coordinates (x,y) elsewhere. The MAD is a robust statistic, being more resistant to outliers in the coefficient set than the standard deviation. In the MAD, the magnitude of the distances of a small number of outliers is irrelevant. Consequently, it can be assumed that MAD{spq}=MAD{tpq}, and we call it simply MADpq. For a symmetric distribution about the mean, such as the normal distribution N(0,σpqt), the MADpq is the 3rd quartile, equivalently the 75th percentile (ppq,0.75t). It is known that the relationship between the 75th percentile of a normal distribution N and its standard deviation σ is p0.75(N)0.674492σ. In our case,
MADpq=ppq,0.75t(N)0.674492σpqt.
(5)
From Eqs. (4, 5) the standard deviation σpqt can be straightforwardly estimated from the histogram of the wavelet coefficients spq.

For every detail, we proceed now to the classification of pixels into two categories, those of the flawed area and those of the regular background area of the sample. The classification procedure is based on the magnitude of the wavelet coefficients. Since the manufactured materials to which the method is addressed have few flaws in general, we try to assure—as much as possible—that a pixel classified as belonging to the flawed area is actually part of the flaw. The opposite, that is, a pixel classified as belonging to the flawed area that is not actually part of any flaw, would be a false alarm at the pixel scale. Thus, we intend to keep the false alarm rate limited to a small value.

Once the normal distribution of the coefficients of the background texture N(0,MADpq0.674492) is determined, a double threshold is fixed at 3σpqt4.45MADpq and applied to each spq, which has positive and negative values, according to the expression
spq(x,y)={1,if|spq(x,y)|>3σpqt0,if|spq(x,y)|3σpqt}.
(6)
Using this double threshold the false alarm rate would be limited to 0.0027. Figure 7a shows the result obtained after applying this double threshold to s33o.

The second step is the integration of the binarized images obtained for each scale and orientation. The information is combined by means of addition. Before adding, details of different scale must be resized so that the addition is applied to images of the same size. To do this, a pixel in a low scale image is properly replicated to produce a square with the appropriate number of identical pixels. To reduce misclassification errors, we consider that a pixel will eventually correspond to a defect if the aforementioned addition is greater than or equal to 2 for that pixel. This means that such pixel would be out of the double threshold in at least two wavelet coefficient distributions (details). With this constraint the final false alarm rate for pixels would be less than 103. Figure 7b shows the result obtained for the image s(x,y) of our model (Fig. 3) after this second step.

Apart from the defect, it can be seen that some small points corresponding to the irregularities of the texture (rough paper) are detected and segmented by the algorithm. A simple morphological opening applied to the binary image [Fig. 7b] is useful to limit the possibly excessive sensitivity of the algorithm and to reduce noise [Fig. 7c].

5. RESULTS

Now we apply the unsupervised Gabor filtering based method to real samples with textures that are beyond the applicability of the method for periodic structures reported in [14

14. M. Ralló, M. S. Millán, and J. Escofet, “Referenceless segmentation of flaws in woven fabrics,” Appl. Opt. 46, 6688–6699 (2007). [CrossRef] [PubMed]

], such as all samples of random texture [e.g., pieces of paper in Fig. 9a, 9b]. Moreover, some samples of periodic texture cannot be analyzed by that method either. For example, if the warp and weft lines of a fabric are excessively slanted [see Fig. 9c], the method will fail, because it is based on a precise determination of the periodic structure of the fabric sample and assumes the approximate alignment of the threads in the vertical and the horizontal directions [14

14. M. Ralló, M. S. Millán, and J. Escofet, “Referenceless segmentation of flaws in woven fabrics,” Appl. Opt. 46, 6688–6699 (2007). [CrossRef] [PubMed]

]. There is also a test sample of actual fabric that is composed of a mixture of two periodic textures at close to 50% in area each [Fig. 9d]. This problem is too difficult for the method to test periodic structures [14

14. M. Ralló, M. S. Millán, and J. Escofet, “Referenceless segmentation of flaws in woven fabrics,” Appl. Opt. 46, 6688–6699 (2007). [CrossRef] [PubMed]

]. We have tried it and proved that it fails to identify the main fabric structure and it cannot build the set of filters in the frequency domain. However, all these test samples are successfully analyzed by the unsupervised-Gabor-filtering-based method. Figure 9 shows on the right the segmentation of flaws obtained for each case.

6. CONCLUSIONS

We have applied Gabor wavelets to develop an unsupervised novelty method for defect detection and segmentation that is fully automatic and free of any adjustable parameter. As an additional very important property it is applicable to samples of random as well as periodic textures. Since all the information to inspect a sample is obtained from the sample itself and it does not require the comparison with any standard (faultless) sample or training defect set, the unsupervised novelty detection method proposed in this paper is a method that proof against heterogeneities between different samples of the material, in-plane positioning errors, scale variations, and lack of homogeneous illumination.

A detailed presentation of the Gabor filtering based algorithm has been illustrated step by step for a model sample. The algorithm combines the Gabor analysis of the sample image with a statistical analysis of the wavelet coefficients corresponding to each detail. The statistical distribution of the coefficients corresponding to the background texture is estimated from the coefficient’s distribution in the sample under inspection. As a result, the background texture features are identified. The following steps of the sequence consist of thresholding and merging all details, rescaling whenever necessary.

In the experiments, we have applied this new method to a variety of random and periodic textured test samples, more specifically, to photographic images of real pieces of materials of industrial interest such as paper and fabric. Although the test samples were difficult cases for unsupervised flaw detection, the results were satisfactory and the defect segmentation was correct in all cases. Not only is the sensitivity of the algorithm high, but the specificity is also good, since a negative result was obtained when analyzing a defect-free sample. We have compared this Gabor filtering based method with our unsupervised method specifically designed for periodic structures and limited to the analysis of materials with periodic texture [14

14. M. Ralló, M. S. Millán, and J. Escofet, “Referenceless segmentation of flaws in woven fabrics,” Appl. Opt. 46, 6688–6699 (2007). [CrossRef] [PubMed]

]. The results show a very good agreement between both methods. Although the algorithm reported in [14

14. M. Ralló, M. S. Millán, and J. Escofet, “Referenceless segmentation of flaws in woven fabrics,” Appl. Opt. 46, 6688–6699 (2007). [CrossRef] [PubMed]

] performs more accurate defect segmentation in well-aligned fabrics, the method proposed in this paper also obtains very good results for these samples. Occasionally, the decimation (decrease of the sample image resolution) associated with the implementation of the Gabor wavelets yields lower, but still acceptable, accuracy of the segmented area. On the other hand, the Gabor-filtering-based method proposed in this paper has a wider applicability. It is applicable to random textured samples and is resistant to in-plane rotation of the periodic textured sample, mixtures of periodic structures in the same sample, and other difficult problems that the method reported in [14

14. M. Ralló, M. S. Millán, and J. Escofet, “Referenceless segmentation of flaws in woven fabrics,” Appl. Opt. 46, 6688–6699 (2007). [CrossRef] [PubMed]

] could not overcome.

ACKNOWLEDGMENTS

The authors acknowledge the financial support of the Spanish Ministerio de Educación y Ciencia and the Fondo Europeo de Desarrollo Regional (FEDER) under project DPI2006-05479.

Fig. 1 Examples of twill fabrics affected by subtle and tiny flaws that do not alter the intensity of the background texture. In (a), the mispick defect looks like a phase shift of a periodic pattern, while in (b) the small down heddle defect appears repeated. These are photographic images of real texture samples.
Fig. 2 (a) Photographic image of a piece of fabric with two local defects. (b)–(g) Some examples of the similarity of the coefficients obtained using Gabor filters of different parity (even and odd). (b), (c), (d) Even parts and (e), (f), (g) odd parts of Gabor filters of pq=31,42,44.
Fig. 3 Decomposition of a model flawed texture s(x,y) as the sum of a background defect-free texture t(x,y) and a defect d(x,y). In the example, s(x,y) has been obtained by producing a numerical local alteration (flaw) on the photographic image of a real sample of rough paper (random texture).
Fig. 4 Wavelet coefficients of s(x,y), t(x,y), and d(x,y) (as in Fig. 3) yielded by the imaginary Gabor filter g33o. Gray areas correspond to coefficients with values close to zero, bright areas to positive coefficients, and dark areas to negative coefficients.
Fig. 5 (a), (b) Histograms of the wavelet coefficients of the details s33o and t33o. (c), (d) Truncated histograms of (a), (b) at N=100.
Fig. 6 Histogram of the wavelet coefficients of detail s33o [Fig. 5a, but grouped in a lower number of bins] as a mixture of two zero-mean normal probability distributions, (1α)fpqd(i) and αfpqt(i) with α=0.8121, σpqt=1.668, σpqd=2.829.
Fig. 7 (a) Segmentation of s33o. (b) Integration of the information provided by all the scales and orientations. (c) Opening of (b).
Fig. 8 Photographic images of real fabric samples of the first experiment (left) and results of defect detection and segmentation obtained by two unsupervised novelty methods: center, the Gabor-filtering-based-method described in this paper; right, the method designed for periodic textures described in [14]. (Continues on next page.)
Fig. 8, part 2 Continued from Fig. 8(a).
Fig. 9 Photographic images of real test samples of the second experiment (left) and the corresponding results obtained by the unsupervised-Gabor-filtering-based method (right).
1.

X. Xie, “A review of recent advances in surface defect detection using texture analysis techniques,” Elec. Lett. Comp. Vision Imag. Anal. 7, 1–22 (2008).

2.

J. Escofet, R. Navarro, M. S. Millán, and J. Pladellorens, “Detection of local defects in textile webs using Gabor filters,” Opt. Eng. (Bellingham) 37, 2297–2307 (1998). [CrossRef]

3.

A. Bodnarova, M. Bennamoun, and S. Latham, “Optimal Gabor filters for textile flaw detection,” Pattern Recogn. 35, 2973–2991 (2002). [CrossRef]

4.

Z. Hou and J. M. Parker, “Texture defect detection using support vector machines with adaptative gabor wavelet features,” in Proceedings of IEEE Workshop on Applications of Computer Vision (IEEE, 2005), pp. 275–280.

5.

K. L. Mak and P. Peng, “An automated inspection system for textile fabrics based on Gabor filters,” Rob. Comput.-Integr. Manufact. 24, 359–369 (2008). [CrossRef]

6.

H. Sari-Sarraf and J. Goddard, “Vision systems for on-loom fabric inspection,” IEEE Trans. Ind. Appl. 35, 1252–1259 (1999). [CrossRef]

7.

M. C. Hu and I. S. Tsai, “Fabric inspection based on best wavelet packet bases,” Text. Res. J. 70, 662–670 (2000). [CrossRef]

8.

S. C. Kim and T. J. Kang, “Automated defect detection system using wavelet packet frame and Gaussian mixture model,” J. Opt. Soc. Am. A 23, 2690–2701 (2006). [CrossRef]

9.

F. Truchetet and O. Laligant, “A review on industrial applications of wavelet and multiresolution based signal-image processing,” J. Electron. Imaging 17, 031102 (2008). [CrossRef]

10.

M. Markou and S. Singh, “Novelty detection: a review-part 1: statistical approaches,” Signal Process. 83, 2481–2497 (2003). [CrossRef]

11.

D. R. Rohrmus, “Invariant and adaptive geometrical texture features for defect detection and classification,” Pattern Recogn. 38, 1546–1556 (2005). [CrossRef]

12.

D. M. Tsai and T. Y. Huang, “Automated surface inspection for statistical textures,” Image Vis. Comput. 21, 302–323 (2003). [CrossRef]

13.

A. Abouelela, H. M. Abbas, H. Eldeeb, A. A. Wahdan, and S. M. Nassar, “Automated vision system for localizing structural defects in textile fabrics,” Pattern Recogn. Lett. 26, 1435–1443 (2005). [CrossRef]

14.

M. Ralló, M. S. Millán, and J. Escofet, “Referenceless segmentation of flaws in woven fabrics,” Appl. Opt. 46, 6688–6699 (2007). [CrossRef] [PubMed]

15.

A. Gururajan, H. Sari-Sarraf, and E. F. Hequet, “Statistical approach to unsupervised defect detection and multiscale localization in two-texture images,” Opt. Eng. (Bellingham) 47, 027202 (2008). [CrossRef]

16.

M. S. Millán and J. Escofet, “Fabric inspection by near-infrared machine vision,” Opt. Lett. 29, 1440–1442 (2004). [CrossRef] [PubMed]

17.

M. S. Millán and J. Escofet, “NIR imaging of non-uniform colored webs: Application to fabric inspection,” Proc. SPIE 5622, 188–193 (2004). [CrossRef]

18.

F. Meriaudeau, F. Truchetet, O. Laligant, and P. Bourgeat, “Gabor filters in industrial inspection: a review. Application to semiconductor industry,” Proc. SPIE 6001, 53–62 (2005).

19.

R. Navarro and A. Tabernero, “Gaussian wavelet transform: two alternative fast implementation for images,” Multidimens. Syst. Signal Process. 2, 421–436 (1991). [CrossRef]

20.

O. Nestares, R. Navarro, J. Portilla, and A. Tabernero, “Efficient spatial-domain implementation of a multiscale image representation based on Gabor functions,” J. Electron. Imaging 7, 166–173 (1998). [CrossRef]

21.

M. S. Crouse, R. D. Nowak, and R. G. Baraniuk, “Wavelet-based statistical signal processing using hidden markov models,” IEEE Trans. Signal Process. 46, 886–902 (1998). [CrossRef]

22.

S. C. Kim and T. J. Kang, “Texture classification and segmentation using wavelet packet frame and Gaussian mixture model,” Pattern Recogn. 40, 1207–1221 (2007). [CrossRef]

23.

P. J. Huber, Robust Statistics (Wiley, 1981), p. 107.

OCIS Codes
(100.2960) Image processing : Image analysis
(150.0150) Machine vision : Machine vision
(150.3040) Machine vision : Industrial inspection
(150.1135) Machine vision : Algorithms
(150.1835) Machine vision : Defect understanding

ToC Category:
Machine Vision

History
Original Manuscript: February 24, 2009
Revised Manuscript: June 24, 2009
Manuscript Accepted: June 29, 2009
Published: August 18, 2009

Citation
Miquel Ralló, María S. Millán, and Jaume Escofet, "Unsupervised novelty detection using Gabor filters for defect segmentation in textures," J. Opt. Soc. Am. A 26, 1967-1976 (2009)
http://www.opticsinfobase.org/josaa/abstract.cfm?URI=josaa-26-9-1967


Sort:  Author  |  Year  |  Journal  |  Reset  

References

  1. X. Xie, “A review of recent advances in surface defect detection using texture analysis techniques,” Elec. Lett. Comp. Vision Imag. Anal. 7, 1-22 (2008).
  2. J. Escofet, R. Navarro, M. S. Millán, and J. Pladellorens, “Detection of local defects in textile webs using Gabor filters,” Opt. Eng. (Bellingham) 37, 2297-2307 (1998). [CrossRef]
  3. A. Bodnarova, M. Bennamoun, and S. Latham, “Optimal Gabor filters for textile flaw detection,” Pattern Recogn. 35, 2973-2991 (2002). [CrossRef]
  4. Z. Hou and J. M. Parker, “Texture defect detection using support vector machines with adaptative gabor wavelet features,” in Proceedings of IEEE Workshop on Applications of Computer Vision (IEEE, 2005), pp. 275-280.
  5. K. L. Mak and P. Peng, “An automated inspection system for textile fabrics based on Gabor filters,” Rob. Comput.-Integr. Manufact. 24, 359-369 (2008). [CrossRef]
  6. H. Sari-Sarraf and J. Goddard, “Vision systems for on-loom fabric inspection,” IEEE Trans. Ind. Appl. 35, 1252-1259 (1999). [CrossRef]
  7. M. C. Hu and I. S. Tsai, “Fabric inspection based on best wavelet packet bases,” Text. Res. J. 70, 662-670 (2000). [CrossRef]
  8. S. C. Kim and T. J. Kang, “Automated defect detection system using wavelet packet frame and Gaussian mixture model,” J. Opt. Soc. Am. A 23, 2690-2701 (2006). [CrossRef]
  9. F. Truchetet and O. Laligant, “A review on industrial applications of wavelet and multiresolution based signal-image processing,” J. Electron. Imaging 17, 031102 (2008). [CrossRef]
  10. M. Markou and S. Singh, “Novelty detection: a review-part 1: statistical approaches,” Signal Process. 83, 2481-2497 (2003). [CrossRef]
  11. D. R. Rohrmus, “Invariant and adaptive geometrical texture features for defect detection and classification,” Pattern Recogn. 38, 1546-1556 (2005). [CrossRef]
  12. D. M. Tsai and T. Y. Huang, “Automated surface inspection for statistical textures,” Image Vis. Comput. 21, 302-323 (2003). [CrossRef]
  13. A. Abouelela, H. M. Abbas, H. Eldeeb, A. A. Wahdan, and S. M. Nassar, “Automated vision system for localizing structural defects in textile fabrics,” Pattern Recogn. Lett. 26, 1435-1443 (2005). [CrossRef]
  14. M. Ralló, M. S. Millán, and J. Escofet, “Referenceless segmentation of flaws in woven fabrics,” Appl. Opt. 46, 6688-6699 (2007). [CrossRef] [PubMed]
  15. A. Gururajan, H. Sari-Sarraf, and E. F. Hequet, “Statistical approach to unsupervised defect detection and multiscale localization in two-texture images,” Opt. Eng. (Bellingham) 47, 027202 (2008). [CrossRef]
  16. M. S. Millán and J. Escofet, “Fabric inspection by near-infrared machine vision,” Opt. Lett. 29, 1440-1442 (2004). [CrossRef] [PubMed]
  17. M. S. Millán and J. Escofet, “NIR imaging of non-uniform colored webs: Application to fabric inspection,” Proc. SPIE 5622, 188-193 (2004). [CrossRef]
  18. F. Meriaudeau, F. Truchetet, O. Laligant, and P. Bourgeat, “Gabor filters in industrial inspection: a review. Application to semiconductor industry,” Proc. SPIE 6001, 53-62 (2005).
  19. R. Navarro and A. Tabernero, “Gaussian wavelet transform: two alternative fast implementation for images,” Multidimens. Syst. Signal Process. 2, 421-436 (1991). [CrossRef]
  20. O. Nestares, R. Navarro, J. Portilla, and A. Tabernero, “Efficient spatial-domain implementation of a multiscale image representation based on Gabor functions,” J. Electron. Imaging 7, 166-173 (1998). [CrossRef]
  21. M. S. Crouse, R. D. Nowak, and R. G. Baraniuk, “Wavelet-based statistical signal processing using hidden markov models,” IEEE Trans. Signal Process. 46, 886-902 (1998). [CrossRef]
  22. S. C. Kim and T. J. Kang, “Texture classification and segmentation using wavelet packet frame and Gaussian mixture model,” Pattern Recogn. 40, 1207-1221 (2007). [CrossRef]
  23. P. J. Huber, Robust Statistics (Wiley, 1981), p. 107.

Cited By

Alert me when this paper is cited

OSA is able to provide readers links to articles that cite this paper by participating in CrossRef's Cited-By Linking service. CrossRef includes content from more than 3000 publishers and societies. In addition to listing OSA journal articles that cite this paper, citing articles from other participating publishers will also be listed.


« Previous Article  |  Next Article »

OSA is a member of CrossRef.

CrossCheck Deposited