Abstract
In this article, various approaches are investigated and synthesized for real-time inspection of diversified fabric texture. Improved Gabor filter bank was proposed to detect fabric defects by using its property of steerable directions and scales. Normal fabric textured image was processed with optimal filter and then gauss smooth. Two threshold value of thenormal fabric image will be determined, which are considered as standard of image parameter for segmenting defect areas. For some intense background texture of fabric defect images, background analysis approach is proposed to detect the flaws. The third detection method is multi-scale wavelet, and typical results of the test are provided. Threeapproaches synthesized into a cascade detection system to develop better detection results. Inspection results that conducted on real fabric defects for various approaches reveal that combined detection scheme meet good expectation. Further, preliminary graphical user interface is designed so as to facilitate the operation. After integrate graphical user interface with procedure, parameters material can be acquired, which is vital to applying the inspection system on industrial computer in future.
Introduction
Machine vision-based fabric defect detection method is an inevitable trend in the development of textile industry, which provides high speed, high efficiency, and low-cost defects detection method for textile production departments. In the actual production of textile industry, the texture of fabric is one of the important influences of defect detection [1]. The fabric image is a typical texture image, therefore, the issue of defect detection turns out to be distinguishing abnormal texture information from the normal texture. The main fabric texture structure has threefeatures: cycle, direction, and homogeneity [2]. In fabric texture structure, the emergence of defects means that normal fabric texture’s structure is damaged. Specific fabric texture feature has intense or weak texture background or disorderly texture, etc. Generally, the issue of woven fabric defects detection can be categorized into three classes: spectral, statistical, and model based. Among these methods, spectral approach, such as Gabor transform, wavelet analysis, is comparatively successful in fabric defects detection [3–9]. Fourier analysis based methods are developed for inspecting flaw of fabric as well [10]. However, Fourier transform function is of infinite length, and not suitable for inspecting local fabric defects. In order to overcome this problem, Gabor transform and wavelet analysis are employed. Gabor filter can be classified into two categories, which are optimal filter [11] and filter bank [12].
This article investigates the fabric texture characteristics and defect detectionwith Gabor–Gauss transform measure, the background analysis approach and multi-wavelet analysis method. Three approaches of defects detection are synthesized into a cascade inspection scheme to develop the advantages and effectiveness of these methods. The combined detection scheme has been applied to inspect different texture structure. The results show it is an effective scheme.
Experimental approach and results – Gabor–Gauss method
Improved Gabor function
Gabor filter is a finite impulse response filter. Being effective and solid makes two-dimensional Gabor filters a very important tool in image processing and edge enhancement [13]. Its impulse response in spatial domain was defined as Gauss envelope function that was modulated by periodic function:
Where,
The filter has real part and imaginary part, each of which phase shifted π/2. The Spatial domain and frequency domain of Gabor filter.
Equation (1) is called the Gabor filter. For a Gabor filter bank, a primitive function
Here,
Spatial and frequency-domain of direction adjustable Gabor filter bank is shown in Figure 2.
Steering Gabor filters bank into arbitrary orientations. Former two rows portray Gabor filters in the spatial domain, and latter two rows show the same filters in the frequency domain.
For an input image, processed by Equation (4), the image
Selection of optimal function filter
Certain scale and direction of Gabor filter have strong response to some texture of fabric defect. Normal texture fabric is processed with Gabor filter when normal filter scale parameter σ and direction parameters θ are obtained. Here, conception of loss function need to be introduced, namely, the difference of gray-scale mean value of defect area and texture mean value of normal area. First, we divide the 512×512 image into 16 equal subregions and then calculate the mean value and gray level value of the filter output. Using the defect area amplitude values and neighborhood different characteristics, the maximum and minimum values are chosen and then
Filter function applied in all filtered subgraph, and largest channel of loss function is chosen by optimal filtering output, image marked as
Image binarization
In order to locate defect location, the gray-scale image needs to be transformed into binary image. On the basis of normal texture images of optimal Gabor filtering, smooth processed image can be obtained by gauss low-pass filters. The purpose of this treatment is to eliminate the effects of speckle noise which are produced in the process of binary transformation. Filter mathematics description is shown as:
The process of filtering is shown in Figure 3. After the convolution, the output signals deburring is greatly abated, and it can effectively remove the related noise information.
Gauss smoothing process.
Normal reference threshold of fabric texture can be acquired through filtering. As a matter of fact, unilateral filtering has the obvious impact of image edge, that is necessary to neglect the border to determine the maximum Process of binarization. Fabric defects detection with Gabor–Gauss approach. Figure (a) and (b) are mispick and overshot-stains, respectively. Figure (c) is multi-channel analysis graphic.

Background analysis approach
When the texture interference is intense, image background analysis method is proposed. The characteristic of this method is its lower time complexity. It can be a cascade process with the previous Gabor–Gauss method, and an alternative procedure to detect defects. In order to get better segment effect, image enhancement process should be conducted first; then ‘closed’ operation and background information is extracted. Here, choosing proper structuring element is important, such as, the shape or scale of the structuring element. In the preliminary stage, supervised inspection is needed. To some certain textured fabric, specific parameter of structuring element needs to be determined, or, relevant ratio of single yarncross-sectional area to entire image that is to be inspected. Web image is selected and divided into 512 × 512 pixels along with single yarn diameter normal length at 1–4 pixels in the preprocessed image. There is a linear relationship of yarn cross-sectional and texture roughness. It can be a vital factor of web inspection effect as well.
Generally, when the single yarn diameter is larger than 4 pixels in image of size 512×512 pixels, the effectiveness of inspection will be greatly influenced by illumination, texture shadow, and even holes from small density of warp and weft. Inother words, appropriate ratio between single yarn diameter and specific image size should be taken into account to observe some texture detail and shadow. In practice, that implies selecting proper resolution of camera and space between web and camera. All factors mentioned above are very important to fabric image analysis. As to woven fabric, ordinary width of defects is larger than length of two yarn diameter, for a ‘disk’ structuring element in ‘closed’ operation, three multiple length of ‘disk’ diameter to single yarn diameter can effectively remove texture or shadow interfere. Then, Otsu method is employed to determine proper threshold, which is a vital factor for segmentation of defects [14]. The proposed method obtains a value in [0, 1] by calculating global threshold level, and threshold choice is from this interval. Former step minimizes the combination variance of black-and-white pixel. Thus, a gray-scale image is transformed into a binary imageand defects segmentation is done. Specific experimental results are provided in Figure 6.
Defects detection using background analysis method: (a) hole defect, and (b) pilling defect.
Multi-scale wavelet method
The objective of using multi-scale wavelet representation is to attenuate the background texture and accentuate the defects. Multi-scale wavelet image processing method using smooth filter functions
where
Normally, the fabric image that is represented by pixels is digital image. Hence, continuous wavelet is transformed into binary form as we detect the edge, namely,
where
and the included angle between gradient vector and horizontal direction is:
As a result, the inflection point of smoothed image Result of yarn evenness defects detection using multi-scale wavelet approach.
Comprehensive analysis and quadtree decomposition
Due to various fabric material texture and illumination condition, identical arithmetic may have diverse outcome of detection. In this research, six different textured fabrics are considered. These images are of size 512×512 pixels. The single yarn diameter in these fabrics respectively are 1/2/3/4 pixels. Provided warp and weft have the same diameter, take woven fabric, for example, fabric of size 512×512 pixels approximately have 256/128/85/64 yarns both in
Position locating
Every image block is divided equally into four quadrants, each subregion is labeledrespectively as (0,0), (0,1), (1,0), (1,1). For any cell, let us say (0,1), have defects information, quadtree decomposition applied in this cell, and the four newchildren are (01,00), (01,01), (01,10), (01,11), the rest may be deduced by analogy principle description as shown in Figure 8(a). For example, if we use slubby yarn defects, locating and labeling the non-subdivided cell in the original image need only seven pairs coordinate number. Table 1 shows relevant position encoding of slubby yarn defect.
Process of quadtree decomposition on defects locating: (a) principle of image cell encoding, (b) upper left point encoding position in slubby yarn defect fabric. Position and encoding of main geometry point of slubby yarn defect
Similar approaches are applied to some other fabric defects; test results are shown in Figures 9–11. Inspection results of three different proposed approaches are Gabor–Gauss method in Figure 9, background analysis approach in Figure 10, and multi-scale wavelet analysis method in Figure 11. The encoding of defects area is helpful for pinpointing relevant position on web.
(a) Images of defective fabrics, the upper is mispick defect, the lower is float defect, (b) inspection results of Gabor–Gauss method, (c) the corresponding segmented defects, and (d)results of quadtree decomposition. (a) Images of defective fabrics, the upper is hole defect, the lower is pilling defect, (b)inspection results of background analysis approach, (c) the corresponding segmented defects, and (d) results of quadtree decomposition. (a) Images of defective fabrics, the upper is evenness defect, the lower is slubby yarn defect, (b) inspection results of multi-scale wavelet method, (c) the corresponding segmented defects, and (d) results of quadtree decomposition.


Graphical user interface design
In order to facilitate the experiment of fabric defect image inspection as well as design, it is necessary to have independent operation fabric image capture and inspection software. On the basis of Matlab 2010b version, this article has designed interface of ordinary textile image monitoring and detection graphical user interface (GUI), which is accommodated with this article. Main interface is shown in Figure 12.
Main interface of defects detection.
This GUI has several practical features. First, the defect detection operation process can be disintegrated, and if necessary, parameter modification can be used to obtain best test conditions of relevant texture, which is very helpful for study. Second, is the on-line monitoring function. The window at upper left is real-time preview video window; upper right window is the manual acquisition and display window of single frame image; the lower left window is classification detection window, in which one can chose appropriate method and display the inspection result. There are three main methods applied at early stage, that is, Gabor–Gauss filtering method, fabric background analysis approach, and multi-scale wavelet detection measure. Third feature is flexible display. Interface detection process display windows are reserved, if necessary, relevant process windows and different methods of detection performance window can be shown so as to have further analysis.
Discussion
Affected by the ratio between acquired fabric image size and real size of fabric, the minimum accuracy is 2 units (provided that weft and warp have equal diameter, let’s say 1 unit). Most of fabric defects are larger than 2 units; higher resolution of camera or higher accuracy will greatly increase the cost of digital image processing. From the ratio relation of real defects size and corresponding fabric image that is acquired by camera, preliminary accuracy of detection is 2 units. Amendment works are necessary in future, such as accuracy, illumination, stability of system, etc.
The location of defects of fabric are shown at specific positions in related acquired image. To locate the position of defects area, first thing is to determine camera position of captured image, then, from the fabric image that is captured, specific location could be determined by using quadtree method.
Conclusion
The real fabric texture is varied and the realistic flaw information is various as well; the different testing methods for different defect information may not be satisfactory when it takes results into consideration. It is significant to use combined methods to inspect fabric texture defect. In this article, Gabor filter analysis approach, background analysis measure, and multi-scale wavelet analysis method are proposed to conduct combined inspection of fabric textures, which aim at enhancing algorithm advantage in machine vision inspection. The experimental results have proved that combined testing measures are appropriate. The proposed combined detection approach applied in the actual operation obtained good and expected results as well. Quadtree decomposition encoding locates specific position of defects segmentation. Through conversion of programming language, this article obtained relevant parameter information, which is of great value for applying combined detection approach to small industrial computers in near future.
Footnotes
Acknowledgement
The author is grateful to Graduate Innovation Fund (No.chx110926) support from Xi’an Polytechnic University, Xi’an, Shaanxi, PRC; Scientific Research Program Funded by Shaanxi Provincial Education Department (Program No.11JK0910), Shaanxi, PRC; Research and Development Project of Science and Technology (No.2010K09-17), Shaanxi, PRC.
