Abstract
Fabric defect detection has attracted increasing attention in the fields of computer vision and textile engineering because it is essential to quality assurance of textile manufacturing. In this paper, we propose a novel defect detection scheme for fabric inspection based on bidimensional empirical mode decomposition. The stopping criterion for sifting and the intrinsic mode functions (IMFs) are adapted for this specific application. Appropriate IMFs are selected to eliminate influences of fabric textures and lighting in defect segmentation. The experiment results on sample images from our laboratory and from TILDA’s Textile Texture Database demonstrate that the proposed method is a robust and accurate approach for fabric defect inspection.
A defect is a flaw that occurs on the fabric surface during manufacturing, and is possibly caused by a defective yarns, machine failure and/or manual operational error. Fabric defects undermine product quality and could decrease the price of fabrics by 45–65%. 1 Given that defects inevitably occur, defect inspection is critical to quality assurance in fabric production. 2 Fabric inspection is traditionally carried out by textile experts, who conduct a completely subjective evaluation of fabric products. However, an expert can detect no more than 60% of typical defects on a fabric wider than 2 m or when its moving speed is faster than 30 m/min. 3 These problems prompted the development of automatic inspection systems based on computer vision. During the past two decades, various techniques of automatic fabric defect detection have been developed in different approaches, including statistical, spectral and model-based ones.4–7
In the statistical approach, the important assumptions are that the statistics of defect-free regions are stationary, and that these regions extend over a significant portion of inspected images. Unser and Ade 8 considered the Karhunen–Loeve transform as the optimum tool for extracting texture features in the inspection of textured materials. Zhang and Bresee 9 combined an autocorrelation function and morphological operations to identify repeating structural units in fabric. Tsai et al. 10 calculated co-occurrence-based features to train and test a neural network for classifying the four types of defects. Chetverikov and Hanbury 11 calculated the regularity and local orientation of textures to identify the defects in regular and flow-like patterns. Kumar 12 extracted a feature vector from each pixel and used a feedforward neural network to detect common defects, such as slack ends and mispicks. Shi et al. 13 defined local contrast deviations to describe contrast differences in four directions between analyzed images and a defect-free image of the same fabric. Fractal methods were also applied to model the statistical qualities like roughness and self-similarity on fabric surface. 14
Fabric images can also be transformed into the frequency domain for defect detection because of the high degree of periodicity of textile materials. Tsai and Hsieh 15 took a one-dimensional Hough transform in the Fourier domain of texture material images to identify high-energy frequency components (i.e., defective components). The Fourier transform (FT) is insensitive to the minor modifications to the frequency spectrum caused by local fabric defects. To overcome this drawback, researchers used other approaches, such as Gabor filters and wavelet transform (WT). Jain and Farrokhnia 16 used the Gabor transform to segment and classify textures with dyadic coverage of the radial spatial frequency range. In the work of Mak et al., 17 a finite set of multi-level Gabor wavelets was tuned to match a defect-free fabric image. The WT enables the decomposition of an image into a hierarchy of localized sub-images at different spatial frequencies. Sari-Sarraf and Goddard 18 developed a fabric defect detection system by using the low-pass and high-pass Daubechies filters, which can detect small defects at a detection rate of 89%. Kumar and Gupta 19 used the mean and variance of the Haar wavelet coefficients to identify surface defects. Chen and Xu 20 employed a method based on a compactly supported biorthogonal WT to inspect fabric defects, including warp lacking, weft lacking, oil stains and holes. Spectral approaches are more advantageous in terms of computational efficiency, but less robust in dealing with random texture images, which cannot be described in terms of primitives and displacement rules.
Model-based approaches are particularly suitable for detecting fabric images with stochastic surface variations or random textures. Cohen et al. 21 treated textile web inspection as a hypothesis-testing problem and implemented the inspection by characterizing fabric textures with the Gauss–Markov random field model. Brzakovic et al. 22 investigated a theoretical approach, in which a Poisson model for inspecting web materials was used. Campbell et al. 23 designed a Gaussian cloud model superimposed on Poisson clutter to detect production defects with linear patterns.
As summarized in the references, each of the aforementioned defect detection methods has limitations. There are still industrial needs to develop efficient and robust algorithms for online fabric inspection. In the past few years, we developed a prototype machine using 4 k-line-scan cameras and linear light-emitting diode (LED) lights for fabric detect inspection. 24 In this paper, we tend to focus on implementation of a novel fabric defect detection method that is based on bidimensional empirical mode decomposition (BEMD). A fabric image can be essentially considered as a two-dimensional (2D) oscillating signal that contains fabric textures, defects and inhomogeneous illumination. We can use BEMD to separate these components into sub-images, and obtain a sub-image that contains only defect information, and therefore possible interferences from fabric textures and lighting can be excluded.
Methodology
Bidimensional empirical mode decomposition
BEMD is a 2D expansion of empirical mode decomposition (EMD), which was originally developed by Huang et al. 25 for analysis of non-linear and non-stationary signals. BEMD can decompose a dataset according to its spatial instantaneous frequency without the need of any base function like sinusoids in FT or wavelets in WT. As a totally data-driven tool, it has been successfully applied in many fields, including image segmentation,26,27 image fusion, 28 edge detection, 29 noise reduction, 30 texture synthesis, 31 image compression 32 and image watermarking.33,34 Its multi-scale decomposition ability provides the possibility of being applied to fabric defect detection.
BEMD decomposes a 2D signal based on the local characteristic spatial scale, namely local instantaneous frequency. The generated oscillating signals represent the oscillation modes imbedded in the data, and they are called intrinsic mode functions (IMFs). An IMF is a function whose number of extrema and zero crossings must either be equal or differ by one, and the mean value of the envelope defined by the local maxima (upper envelope) and the envelope defined by the local minima (lower envelope) should be zero at any point. 25
Given an image I, the process of generating an IMF is called sifting. The sifting algorithm is iterative with a kth iteration detailed as follows:
26
identify the extrema of the result of the k-1th iteration hk-1 (k ≥ 1, h0 is the original image I) and get two sets of maxima and minima, respectively; create an upper envelope from the maxima set and a lower envelope from the minima set by non-equidistant interpolation; calculate the local mean m by averaging the upper envelope and lower envelope; subtract out the mean from hk-1: hk-1 – m = hk; repeat as hk is an IMF.
The iteration of sifting should be applied with care, for carrying the process to an extreme could make the resulting IMF a pure frequency modulated signal of constant amplitude.
25
The sifting process is usually stopped by limiting the size of the standard deviation SD, computed from the two consecutive sifting results as
An IMF c1 is generated when the condition SD ≤ SDmax is met. The selection of SDmax directly affects the calculation time and the information validity of IMFs. The optimal value of SDmax will be discussed in the section Stopping criterion.
The first IMF c1 contains the finest scale component of the image I. Separating c1 from the rest of the data by
The sifting process will finally end when rn becomes a monotonic function from which no more IMFs can be extracted. Actually, this can be time-consuming and unsuitable for industrial applications. Thus, the sifting process can be terminated manually based on a reasonable observation, and we obtain
Delaunay triangulation-based interpolation
Creating the envelope surface from a 2D extrema set is a problem of non-equidistant interpolation on scattered data points. Delaunay triangulation (DT)-based interpolation is a finite element method (FEM) for 2D envelope calculation. A DT for a set P of points in a plane is denoted as DT(P) in which no point in P is inside the circumcircle of any triangle.
35
It provides a triangular grid for scattered extreme points, and then the interpolation can be piecewise implemented with the vertices of triangles. Figure 1(a) shows a synthetic fabric image (128 × 128 pixels). Its maximum points are shown in Figure 1(b). Figures 1(c) and 1(d) are the triangular grid generated by DT and the upper envelope.
Delaunay triangulation-based interpolation: (a) synthetic fabric image; (b) maxima set; (c) triangular grid; (d) upper envelope.
IMF selection
To demonstrate the multi-scale representation of IMFs, we analyze a defect-free and a defective synthetic fabric image (512 × 512 pixels) for a comparison. The images present a typical woven structure shaped by simulated yarns on the weft and warp directions, a common defect mode and an inhomogeneous illumination. In the analysis, the images are decomposed into three IMFs and a residue. Given that some points in the IMFs are negative, a map function (Equation (5)) is employed to visualize the data generated from BEMD:
Bidimensional empirical mode decomposition analysis of synthetic fabric images
IMF fusion and segmentation
Since defect information is spread in IMF2 and IMF3, a defect sub-image can be constructed by fusing IMF2 and IMF3:
The constructed sub-images of the two synthetic fabric samples are shown in Figure 2. They are visualized in a grayscale range of [0, 255] because of the 0 mean property inherited from the IMFs.
Intrinsic mode function fusion results of defect-free fabric (a) and defective fabric (b).
The last step to recognize defects is to identify a thresholding method that generates binary images from IMF fusion images. Usually, defects appear brighter than the background due to the oblique illumination. Therefore, global binarization using double thresholds calculated with the following empirical equation is adopted:
36
Defect segmentation results of the defect-free fabric (a) and the defective fabric (b).

The whole process of this defect detection algorithm, including modified BEMD, IMF fusion and defect segmentation, is illustrated in Figure 4.
Fabric defect detection scheme based on bidimensional empirical mode decomposition (BEMD).
Experimental details
Defect segmentation results based on bidimensional empirical mode decomposition
Stopping criterion
Error rates of the first 10 iterations of sifting for IMF1 from the sample images
As shown in Table 3, error rates usually fluctuate and did not quickly converge after several iterations. This can be attributed to a natural drawback of interpolation on discrete data. Another reason for the results is the negative effect of the sifting, including the smoothing of uneven amplitudes and the boundary effect, which cause interference to the computations. The negative effects of sifting do not surpass the positive effects until the error rate is lower than a value between 0.04 and 0.07. Thus, the stopping criterion SDmax should be greater than 0.07. On the other hand, the error rates rapidly decrease when they reach a value beyond 0.30, prompting us to set suitable SDmax between 0.07 and 0.30. The conditions for IMF1 are that it should contain the main part of texture structure and avoid time-consuming iteration in sifting. To satisfy these requirements, we set 0.2 as the optimal value of SDmax after testing different values. During the calculation of SD, the computational precision is 10−6. Sifting is commonly terminated after 2–4 cycles, shown as gray cells in Table 1. In particular, sample 12 reflects the surface of hemp fabric, which shows a higher irregularity of woven structures than other samples. Thus, the error rate of this sample more intensely fluctuates, and more iteration is involved in its sifting. We generated IMFs containing a sound profile of defects using SDmax = 0.2, as shown in the ‘IMF fusion’ column of Table 2 .
Defect segmentation
Using the segmentation method described by Equations (7) and (8), we generated the binary results, as shown in the last column in Table 2. The sample set involves different fabric structures, for example, twill, plain fabric and hemp, and defect of various styles. Segmentation was well implemented on these samples and the defect profiles were provided. We can use the segmentation results to identify the defect location.
Validation test
Detection rates for different fabric images
BEMD: bidimensional empirical mode decomposition.
Computational complexity
The computational complexity of one iteration of sifting is O(n), which is equivalent to O(2n + 2n + 2), including O(n) for DT interpolation, 38 O(n) for extrema identification and O(1) for computing local mean surfaces and oscillating signals. For fabric inspection, the number of IMFs is fixed to three and the iteration times of sifting process for each IMF is relatively solid at 2–4. Thus, these parameters are not problem scales that affect computational complexity. The proposed algorithm has a complexity of O(n), which is reasonable for industrial application. For a 256 × 256 image, the average computational time with an Intel E7300 CPU is 3.4789 s. Improvement in calculation speed will be one of our focus points in the future development.
Conclusion
In this paper, a novel fabric defect detection method based on BEMD has been introduced. Multi-scale representation by BEMD was carried out for the separation of different components in fabric images. The amount of information in an IMF was determined by the stopping criterion of sifting. The fabric texture was separated into IMF1, and inhomogeneous illumination was retained in the residue. Thus, IMF2 and IMF3 contained defect information and can be fused into a sub-image with enhanced defect information. Binarization based on double thresholds was carried out to segment defects out of the sub-image. The proposed scheme was tested on various types of defects, such as broken ends, broken picks, holes, bars and stitches, both from our image acquisition system and the TILDA database. The validation test demonstrated that the method has a defect detection rate of 96.1%, and is robust to different types of defects and fabric textures.
Footnotes
Funding
This research received no specific grant from any funding agency in the public, commercial or not-for-profit sectors.
Acknowledgment
The authors would like to thank the anonymous reviewers and the handling associate editor for their insightful comments. This project was supported by “National Natural Science Foundation of China” [grant number 61203363 and 61202310], “China Postdoctoral Science Foundation” [grant number 20110490098], “Special Financial Grant from the China Postdoctoral Science Foundation” [grant number 2012T50754], “Foundation of Engineering Research Center of Technical Textiles, Ministry of Education” [grant number 2011k-03], “Open project program of key laboratory of ECO-Textiles (Jiangnan University), ministry of education, China” [grant number KLET1114 and KLET1113], “Fundamental Research Funds for the Central Universities” [grant number JUDCF11006], “Natural Science Foundation of Jiangsu Province” [grant number BK2011156], “Research Project of Jiangsu Entry-Exit Inspection and Quarantine Bureau” [grant number 2013KJ28], and “Program for Postgraduates Research Innovation in University of Jiangsu Province” [grant number CXZZ11_0472 and CXZZ12_0748].
