Abstract
Image inspection by wavelet packets and a neural network classifier is presented for non-defect and six kinds of defects in knitted fabrics. The types of defect include a hole, set mark (coarse), dropped stitch, oil stain, streak, and tight end. In this study, wavelet packet decomposition of a sample image is carried out based on the best-basis wavelet packet tree with three resolution levels. The lowest-two entropy among all sub-band images and the standard deviation for the original image are selected as feature inputs of the neural network classifier. These textural features are shown in seven groups, which are separately distributed in the feature space. We gathered a total of 112 experimental samples, with 16 samples in each of the seven aforementioned categories. The results demonstrate that with the three features, 56 test samples are correctly inspected. However, the lack of one of the three features yields wrong classification of some samples. Therefore, the three features selected are definitely suitable for recognition of our knitted fabric defects and also are the smallest number of features required to give accurate inspection.
Defect inspection of textile products is one of the steps for quality assurance. Knitted fabrics are one of the widely used textile products, and their defects, such as holes, set marks (coarse), dropped stitches, oil stains, streaks, and tight ends, are frequently encountered. Hence, inspection of these defects is helpful to enhance knitted fabric qualities. Currently, the defects are inspected by human inspectors, a tedious and fatiguing work when a great deal of inspection is to be done, and suffering from inconsistent outcomes owing to the subjective criteria of inspectors. Moreover, incorrect judgments are often made due to poor mental and physical conditions. Image inspection provides accuracy, consistency, repeatability, and a low-cost solution to the drawbacks associated with human inspection. 1
In the past, much effort has been devoted to defect inspection of woven fabrics. Chen et al. 2 selected 93 feature values from power spectra and a back-propagation neural network to classify 12 fabric defects. Tsai et al. 3 used a neural network classifier for defect inspection of neps, broken ends, broken picks, and oil stains with features of six contrast measures. Chan 4 extracted seven significant characteristic parameters from the central spatial frequency spectrums for defect classification. The fabric defects include double yarn, missing yarn, broken fabric, and yarn density variation. Kim et al. 5 calculated the signal-to-noise ratio based on the results of wavelet transform to detect four defects of different styles of fabric.
Feature extraction is a crucial step in pattern recognition. 6 The wavelet packets have been shown to be useful for extraction of textural features and have been successfully used in texture classification. Laine and Fan 7 computed energy and entropy matrices for each wavelet packet, and employed a neural network and a minimum-distance classifier to classify 25 natural textures. Pun and Lee 8 proposed a two-stage wavelet packet feature approach, involving extraction of the dominant wavelet features in the first stage and wavelet packet features from the polarized form of the sample image in the second stage, for rotation-invariant texture classification of 20 textures. Lee and Pun 9 used dominant energy features from wavelet packet decomposition and a Mahalanobis distance classifier to classify 20 classes of natural textures. The good texture classification capabilities enable the wavelet packets to be applicable to defect inspection in various areas. Kumar and Pang 1 used the values of the shift invariant measures and their location on the best-basis wavelet packet tree as features to classify defect and defect-free fabrics. Hu and Tsai 10 selected the values and positions for the smallest-six entropy in a wavelet packet best tree as the feature inputs of the neural network to identify missing ends, missing picks, oily fabric, and broken fabric. To inspect defects of cold rolled stripes, Lee et al. 11 developed an adaptive wavelet packet scheme to automatically determine the optimal quadtree and extract a small number of features for each sub-band.
In this study, we decomposed a sample image based on three resolution levels of the best-basis wavelet packet tree. The wavelet packet decomposition generated a large number of wavelet packet coefficients at every resolution level, exhibiting different information content of the original image in sub-bands. Since the shift-variant coefficients are not suitable for direct use, shift-invariant measures, such as the standard deviation and entropy for each channel, can be used as textural features. 1 Accordingly, to reduce the feature set, we selected the lowest-two entropy among the decomposed sub-images, together with the standard deviation of the original image, as features. Moreover, we adopted the back-propagation neural network as a classifier because it has shown good classification abilities in textile products.12,13
In previously published papers,10,14 the authors mainly focused on the identification of four common kinds of fabric defects. However, wavelet packet transform was used to inspect six kinds of fabric defects (namely holes, set marks, dropped stitches, oil stains, streaks, and tight ends) with knitted fabric and standard knitted fabric. The wavelet packet transform decomposes an image into smooth sub-images and detailed sub-images. In addition, the features (lowest and second lowest entropy) of entropy from the sub-images and standard deviation from the original image were extracted for effective and precise classifications.
In this paper, a high performance in defect inspection of knitted fabrics can be achieved with the smaller feature set, and the necessity of all three features to yield accurate classification is experimentally justified.
Wavelet packets
Multi-resolution representations are very effective for analyzing the information content of images.
15
The wavelet packets, a generalization of multi-resolution decomposition, recursively decompose not only the low-frequency components but also the high-frequency components. The wavelet packet bases are used to obtain multi-resolution decomposition of a signal. A sequence of functions
The wavelet packet decomposition of a signal f(x) generates the wavelet packet coefficients simply by the inner products of f(x) with distinct wavelet packet bases
A set of two-dimensional (2D) wavelet packet basis functions can be expressed by the tensor product of two one-dimensional (1D) wavelet packet basis functions in the horizontal and vertical directions. The corresponding 2D filters can be obtained as follows:
8
The four filters can decompose an image into four sub-images that contain the low-frequency approximation and high-frequency details in the horizontal, vertical, and diagonal directions. This decomposition process is recursively applied to each sub-image, thus generating more and more sub-images of smaller size as the resolution level increases. As a demonstration, the original image of Two resolution levels of wavelet packet decomposition: (a) resolution level 1; (b) resolution level 2.
Experiment and results
A total of 112 samples of defect-free and fabrics with defects are prepared. The sample is horizontally placed, and is tightly held at two ends by two rollers. A charge-coupled device (CCD) camera is placed directly above the sample. Three lamps of 60 W at 25 cm above the sample and one lamp of 60 W at 8 cm directly below the sample are used to illuminate the sample. The three lamps above the sample are equally placed at an angle interval of 120o and direct to the sample at angle of 45o with the horizontal direction. The sample image, covering an area of 25 cm2 in the fabric, is captured and digitized by the CCD camera and frame gabber at a resolution of Sample images: (a) non-defect; (b) hole; (c) set mark (coarse); (d) dropped stitch; (e) oil stain; (f) streak; (g) tight end.
The wavelet packet decomposition of every image is performed based on the best-basis wavelet packet tree. The image is decomposed into four sub-images by the filtering process. The original image and its four sub-images can be viewed as the parent node and children nodes, respectively, of a tree. The “Shannon’s entropy” of a Best-basis wavelet packet decomposition of sample images: (a) non-defect; (b) hole; (c) set mark (coarse); (d) dropped stitch; (e) oil stain; (f) streak; (g) tight end.
The wavelet packet coefficients from each of the sub-images are used for feature extraction; thus, we computed the entropy for all the sub-images using Equation (8). In order to reduce the dimension of the feature space, we chose the lowest and second lowest entropy,
Previously, Guan 19 used the standard deviation of the warp and weft sub-window as the extracted features for determining defect existence. If the standard deviation of test sub-window exceeds the standard deviation of the normal fabric sub-window, it can judge the existence of defects. If the defect is detected, it will continue to extract energy and texture entropy, with very poor texture features. The standard deviation represents the changes of the texture surface. The greater change indicates the uneven texture surface; on the contrary, small changes represent consistency of texture surface. Therefore, the lowest and second lowest entropy as well as standard deviation are applied in this study for effectively and precisely inspecting fabric defects.
Figure 4 shows the normalized feature values of our training samples in the projection planes, Normalized feature values in the projection planes of the feature space: (a) ɛ1–ɛ2 plane; (b) σ–ɛ1 plane (♦ non-defect, ▪ hole, ▴ set mark (coarse), x dropped stitch, * oil stain, • streak, + tight end).
Output vectors of 21 test samples
Output vectors of misclassified samples using only two features
Conclusions
The wavelet packet decomposition displays the information content of a knitted fabric image in different directions and frequencies. In this paper, the feature set includes the lowest-two entropy based on three resolution levels of best-basis wavelet packet decomposition, and the standard deviation of the original image. The wavelet packet decomposition and the smaller feature set lead to less computation time in classification while still achieving a high accuracy rate. If only any two of three features are used in this study, the experiment results will give wrong classification. However, if the three features are applied in this study, an accuracy of 100% inspection will be achieved. The experimental results are indicated in Tables 1 and 2.
Footnotes
Funding
This study was supported by the National Science Council of the Republic of China (grant no. 97-2221-E-011-030-MY3).
