7
http://trj.sagepub.com Textile Research Journal DOI: 10.1177/0040517505053874 2005; 75; 492 Textile Research Journal R. Ghazi Saeidi, M. Latifi, S. Shaikhzadeh Najar and A. Ghazi Saeidi Computer Vision-Aided Fabric Inspection System for On-Circular Knitting Machine http://trj.sagepub.com/cgi/content/abstract/75/6/492 The online version of this article can be found at: Published by: http://www.sagepublications.com can be found at: Textile Research Journal Additional services and information for http://trj.sagepub.com/cgi/alerts Email Alerts: http://trj.sagepub.com/subscriptions Subscriptions: http://www.sagepub.com/journalsReprints.nav Reprints: http://www.sagepub.co.uk/journalsPermissions.nav Permissions: http://trj.sagepub.com/cgi/content/refs/75/6/492 Citations by Ershad Khan on October 21, 2008 http://trj.sagepub.com Downloaded from

Computer Vision-Aided Fabric Inspection System

  • Upload
    mobarok

  • View
    26

  • Download
    4

Embed Size (px)

DESCRIPTION

computer vision

Citation preview

Page 1: Computer Vision-Aided Fabric Inspection System

http://trj.sagepub.com

Textile Research Journal

DOI: 10.1177/0040517505053874 2005; 75; 492 Textile Research Journal

R. Ghazi Saeidi, M. Latifi, S. Shaikhzadeh Najar and A. Ghazi Saeidi Computer Vision-Aided Fabric Inspection System for On-Circular Knitting Machine

http://trj.sagepub.com/cgi/content/abstract/75/6/492 The online version of this article can be found at:

Published by:

http://www.sagepublications.com

can be found at:Textile Research Journal Additional services and information for

http://trj.sagepub.com/cgi/alerts Email Alerts:

http://trj.sagepub.com/subscriptions Subscriptions:

http://www.sagepub.com/journalsReprints.navReprints:

http://www.sagepub.co.uk/journalsPermissions.navPermissions:

http://trj.sagepub.com/cgi/content/refs/75/6/492 Citations

by Ershad Khan on October 21, 2008 http://trj.sagepub.comDownloaded from

Page 2: Computer Vision-Aided Fabric Inspection System

Computer Vision-Aided Fabric Inspection Systemfor On-Circular Knitting Machine

R. GHAZI SAEIDI

Textile Engineering Group, Azad University, South Tehran Branch, Iran.

M. LATIFI1 AND S. SHAIKHZADEH NAJAR

Textile Engineering Department, Amirkabir University of Technology, Tehran, Iran.

A. GHAZI SAEIDI

Electronic Engineering Department, Mazandaran University, Babol, Iran.

ABSTRACT

This paper describes a computer vision-based fabric inspection system implemented ona circular knitting machine to inspect the fabric under construction. The study consistedof two parts. In the first part, detection of defects in knitted fabric was performed and theperformance of three different spectral methods, namely the discrete Fourier transform,the wavelet and the Gabor transforms were evaluated off-line. In the second part, knittedfabric defect-detection and classification was implemented on-line. The captured imageswere subjected to a defect-detection algorithm, which was based on the concepts of theGabor wavelet transform, and a neural network (as a classifier). An operator encounteringdefects also evaluated the performance of the system. The fabric images were broadlyclassified into seven main categories as well as seven combined defects. The results of thedesigned system were compared with those of human vision.

Circular knitting is one of the easiest and fastest ways(20 million stitches per minute) to produce cloth andtextile pieces such as garments, socks, and gloves. Thefabric roll is removed from the large diameter circularknitting machine, and then sent to an inspection frame. Ifinspection could be done on the machine, the need for100% manual inspection would be eliminated [7].

The existing defect-detection techniques can be clas-sified into three different categories: statistical, spectral,and model-based. The defect-detection approach byZhang and Bresee [21] is based on first-order statisticssuch as mean and standard deviation. The fabric image isdivided into sub-blocks with the use of information ob-tained by auto-correlation. The use of a gray-level co-occurrence matrix of the image is based on second-orderstatistics [2]. However, these statistical techniques arenot useful for the detection of those textured defectswhose statistical features, namely the first- and second-order moments, are significantly close to that of defect-free textured regions [13]. A high level of quality assur-

ance requires identification of such defects, and thereforetechniques based on spectral features have been investi-gated in the literature.

Textured materials, such as woven and knitted fabrics,possess strong periodicity due to the repetition of thebasic weaving pattern. Therefore spectral techniques us-ing a discrete Fourier transform [4, 19], optical Fouriertransform [17], and windowed Fourier transform [3]have been used to detect woven fabric defects. Escofet etal. [8] have used the angular correlation of the Fourierspectra to evaluate fabric web resistance to abrasion.Sari-Saraf and Goddard [18], and Chan and Pang [4]have used a Fourier transform to detect fabric defects.Ravandi and Toriumi [16] have also used Fourier trans-form analysis to measure fabric appearance. Escofet etal. [9] have used a bank of multi-scale and multi-orien-tation Gabor filters for the detection of local fabric de-fects. Kumar and Pang [12] have demonstrated anotherapproach to fabric defect detection using real Gaborfunctions. Jasper et al. [10] have shown that the textureinformation can be adapted into wavelet bases. Such anadapted wavelet bases offer high sensitivity to the abruptchanges in the surface texture caused by defects, en-abling their detection. Several works have also demon-

1 To whom correspondence should be addressed: e-mail:[email protected]

492 TEXTILE RESEARCH JOURNAL

Textile Res. J. 75(6), 492–497 (2005) DOI: 10.1177/0040517505053874 © 2005 Sage Publications www.sagepublications.com

by Ershad Khan on October 21, 2008 http://trj.sagepub.comDownloaded from

Page 3: Computer Vision-Aided Fabric Inspection System

strated various approaches to the detection of surfacedefects using wavelet basis functions [15, 11, 14]. TheMarkov random field model is a model base for describ-ing local statistical dependence of the image [5, 6]. Thepresent work focuses on defect-detection and classifica-tion on an on-circular knitting machine during process-ing using spectral methods including the discrete Fouriertransform, wavelet and Gabor.

Hardware Description

KNITTING MACHINE SPECIFICATIONS

A single jersey mini-jacquard circular knitting ma-chine with a 30 inch cylinder, gauge 24 and 72 feederswas used. On this machine, a plain knitted fabric can beproduced using viscose/polyester yarn (30 Ne). Due tosome operational limitations for mounting the cameraand in order to capture the full fabric surface image, only36 yarn feeders were utilized.

IMAGE ACQUISITION SYSTEM

The system consisted of a 640 � 320 element CMOS(Complementary Metal Oxide Semiconductor) camera,which was synchronized to the moving fabric by meansof an incremental encoder, a microcontroller board, anda personal computer-based AMD Athlon XP 1800�processor. The custom-made component in this systemwas the microcontroller board, which was used to extractthe forward movement of the fabric and to enable accu-rate image capture by the camera. These componentswere used to acquire images of the fabric under construc-tion and to store them on the computer.

Experiments

LABORATORY DEVELOPED EXPERIMENT

The aim of this test was to evaluate and compare theperformance of three different spectral methods, namely

the discrete Fourier transform, the wavelet and Gabortransforms for fabric fault detection. In order to controlthe image acquisition process, a program using Lab-View software was developed. The program was respon-sible for on-line capturing and storing of digital imagesreceived from the CMOS camera according to the mi-crocontroller commands. Defect-detection and classifi-cation was performed off-line using a program writtenwith MATLAB software. The knitting machine was runwith different speeds (2/3 to 17/rpm) and different fabricfaults including vertical stripe, vertical soil stripe, hori-zontal stripe, horizontal soil stripe, crack or hole, nep orslub were created. Images of these fabric samples wereacquired under front lighting. Figure 1 shows typicalfabric defects considered in this experiment.

The dimension of each individual image was 3.7 � 3.4cm (176 � 144 pixels), with 256 gray levels. A total of2315 fabric images were captured and then the fabricfaults were detected off-line. As a front-lighting methodwas used, there were no very noticeable differencesbetween the vertical faults resulting from various causes.For this reason, these faults were classified in the verticalstripe category. A similar situation was found betweenthe loop length variation and double yarn fault so thatthey were classified in the horizontal faults group. In thisexperiment, 20 images corresponding to six differentcategories of fabric defect and 20 images of defect-freefabric were used. In general, 50% of the images of eachcategory were employed for training and remaining im-ages were used for testing.

THE FOURIER TRANSFORM METHOD

In this section, a method that was very similar to thoseof Ribolzi et al. [17] and Tsai and Hu [20] was used fordetecting fabric defects.

To classify fabric faults, a three-layer perceptron neu-ral network with a feed-forward, back- propagation al-

FIGURE 1. Images of defective fabrics.

JUNE 2005 493

by Ershad Khan on October 21, 2008 http://trj.sagepub.comDownloaded from

Page 4: Computer Vision-Aided Fabric Inspection System

gorithm (three neurons in the first, 10 neurons in thesecond and seven neurons in the third layer, with alearning rate of 0.025 and 3750 epoch) was applied. Theresults of the Fourier transform method are presented inTable I.

THE WAVELET TRANSFORM METHOD

A wavelet transform based on Daubechies [1], secondclass (equation (1)), was employed. The experimentalresults indicated that an appropriate classification couldbe achieved using the third level of the transform.

G��� �1

4�2��1 � �3�ej3� � �3 � �3�ej2�

� �3 � �3�ej� � �1 � �3�� , (1)

where, G(�) is Daubechies function and � is variable.To classify imperfect fabrics, a three-layer perceptron

neural network with a feed-forward, back-propagationalgorithm (30 neurons in the first, eight neurons in thesecond and seven neurons in the third layer with alearning rate of 0.275 and 2250 epoch) was utilized. Thedetailed image was used to calculate the mean and vari-ance of its pixel intensities in order to train the neuralnetwork. The results of the wavelet transform method arepresented below in Table I.

THE GABOR TRANSFORM METHOD

In the last part of the laboratory experiments, aGabor wavelet transform based on the work of Escofetet al. [9], was designed with the parameter values asshown in Table II.

A three-layer perceptron neural network with a feed-forward, back-propagation algorithm (15 neurons in thefirst, eight neurons in the second and seven neurons inthe third layer with a learning rate of 0.475 and 7350epoch) was used as a classifier. The results of the Gabortransform method are presented in Table I.

SUMMARY OF LABORATORY EXPERIMENTAL RESULTS

From the results presented in Table I, it can be con-cluded that the Gabor transform method with a successrate of 78.4% had the highest efficiency value of thethree methods. Therefore, the Gabor transform methodtogether with a three-layer perceptron neural networkand a feed-forward, back-propagation algorithm was se-lected to continue the experiment in an industrial system.

ON-LINE IMPLEMENTATION ON AN INDUSTRIAL SYSTEM

In this part of the study the whole process of imagecapturing, defect detection and classification was per-formed on-line. A schematic diagram of the experimentalset-up is shown in Figure 2. In order to capture, store andprocess the images on-line, at a rate of 13 frames persecond (fps), two computers with similar specificationswere used. The first computer received and detectedimages using two linked programs (Lab-View for imagecapturing and MATLAB for image detection). The sec-ond computer was utilized for fabric defect classificationand grading using two linked programs (Lab-View forcomputer communication and fabric grading and MAT-LAB for defect classifications).

In this experiment, 50 images corresponding to sixdifferent individual categories of fabric defects and 50

TABLE I. The success rate of fabric defect detection corresponding to the different spectral methods.

Fourier transform Wavelet transform Gabor transform

Class type of fabric images No. of detected images No. of detected images No. of detected imagesVertical stripe 1 7 10Horizontal stripe 5 5 10Vertical soil stripe 1 5 2Horizontal soil stripe 1 10 10Nep/slub 3 5 9Hole 0 4 8Defect free 0 0 6Overall success rate (%) 15.71 52.3 78.4

TABLE II. Parameters’ value of Gabor wavelet transform.

Parameters Value

Number of wavelet scales 4Number of filter orientations 6Wavelength of smallest scale filter 3Scaling factor between successive filters 4Ratio of the standard deviation of the Gaussian describing

the Gabor filter’s transfer function in the frequencydomain to the filter center frequency 0.35

Ratio of angular interval between filter orientations andthe standard deviation of the angular Gaussian functionused to construct filters in the frequency plane 1.9

Orientation 1,3,4,6Scale 2

494 TEXTILE RESEARCH JOURNAL

by Ershad Khan on October 21, 2008 http://trj.sagepub.comDownloaded from

Page 5: Computer Vision-Aided Fabric Inspection System

images of defect-free fabric selected from the 2315 im-ages were applied for neural network training. The knit-ting machine was run at speeds of 2/3 to 10 rpm and 8135images including different types of defects and perfectfabric were captured and analyzed using the proposedprogram. To precisely investigate and maintain the effi-ciency of this program, all 8135 images were visuallyinspected and finally the images corresponding to thedefect types were categorized and classified. The resultsof the program were compared with those of humanvision inspection and then the success rate of the systemwas determined (Table III).

Results and Discussion

The experimental results presented in Table I demon-strate that the application of a Gabor transform method

designed for the present work were highly promising interms of the identification of defects in knitted fabric,with an overall success rate of 78.4%. In the case ofvertical and horizontal stripes, horizontal soil stripes andnep/slub defects, the success rate was more than 90%.However, the vertical soil stripe was detected at a lowerrate (20%) because the intensity of this defect was closeto that of the fabric surface (so it is hard to distinguish itfrom a defect-free fabric). In the case of defect-freesamples, the success rate was 60%, presumably due tothe low number of samples used for training the neuralnetwork.

The results from the analysis of 8135 images using theindustrial system for both defective and defect-free fab-ric are shown in Table III. They show an overall successrate of 96.57% with a location accuracy of 2 mm and a

FIGURE 2. Experimental set-up for industrial system.

TABLE III. Final experimental results for industrial system

Class type of fabric imageNo. ofimages

No. of truedetectedimages

No. of undetectedimages

No. of false detectedimages

Success rate(percentage)

Vertical stripe 163 132 1 30 80.98Horizontal stripe 127 104 0 23 81.88Vertical soil stripe 114 67 45 2 58.77Horizontal soil stripe 120 98 12 10 81.66Nep/slub 1722 1651 10 61 95.87Hole 14 9 3 2 64.28Defect free 5791 5735 0 56 99.03Vertical and horizontal stripe 19 16 2 1 84.21Horizontal soil stripe and nep 3 2 0 1 66.66Vertical soil stripe and nep 6 3 3 0 50Vertical stripe and nep 14 8 2 4 57.14Horizontal stripe and hole 28 21 1 6 75Vertical stripe and hole 4 2 1 1 50Horizontal stripe and nep 10 8 1 1 80Total results 8135 7856 163 116 96.57

JUNE 2005 495

by Ershad Khan on October 21, 2008 http://trj.sagepub.comDownloaded from

Page 6: Computer Vision-Aided Fabric Inspection System

false alarm rate of 1.4%. It should be noted that the falsealarm rate was computed as the total number of falsedetections divided by the total number of processed images.

It can be seen that for the most common and themost serious defects, such as vertical and horizontalstripes, vertical and horizontal soil stripes, neps/slubs,horizontal-vertical stripes, horizontal stripes-holes andhorizontal stripes-neps defects, the system perfor-mance was acceptable with the success rates of 75 to95.87%. On the other hand, other defects such asvertical soil stripes, vertical soil stripes-neps, verticalstripes-neps, and horizontal stripes-holes are detectedat a lower success rate of 50 to 60%. In the case ofholes defects, they appeared at the edge of capturedimage and were miss-identified as other defect types.As the intensity of vertical soil stripes was close tothat of the defect-free fabric surface, they were de-tected at a low rate of 58.77%. This result in turncauses the success rate of the vertical soil stripes-nepsdefects to also be low (50%). Furthermore, as theposition of the vertical stripe and nep defects in someimages were very close, these defects are mixed to-gether leading to a low success rate of 57.14%. For thecase of the vertical stripe-hole defect, the number ofsamples was too low and needs further investigation.Typical images of fabric and detected defects areshown in Figure 3.

Conclusions

A computer vision-aided fabric inspection system foran on-circular knitting machine has been described. Twoexperimental approaches, a laboratory-developed exper-iment and an industrial system were investigated.

In the case of the laboratory experiment, in order todetect fabric faults, three different spectral methods (dis-crete Fourier transform, the wavelet and the Gabor trans-forms) were applied to fabric images. It was found thatthe Gabor transform method with a success rate of 78.4%has the highest efficiency value among three methods.

In the case of the industrial system, fabric imagesincluding different types of defects and also defect freewere captured and analyzed using the proposed program.The captured images were then detected by applying theGabor transform and classified into 14 groups utilizing aneural network. To precisely investigate the efficiency ofthe system, all images were inspected under human vi-sion and finally were classified corresponding to defecttypes. The results of the developed system were com-pared with those from the visual categorization and thenthe success rate of the designed machine vision systemwas calculated. The overall success rate of the proposedapproach was found to be 96.57% with a location accu-racy of 2 mm and a false alarm rate of 1.4%.

This paper has presented a new approach for onlinedetection of knitted fabric defects using the Gabor trans-

FIGURE 3. Images of fabric and detected defects.

496 TEXTILE RESEARCH JOURNAL

by Ershad Khan on October 21, 2008 http://trj.sagepub.comDownloaded from

Page 7: Computer Vision-Aided Fabric Inspection System

form. Since this research is limited by the speed of theknitting machine, further studies are required to inspectthe fabric defects in higher speed, circular knitting ma-chines.

ACKNOWLEDGMENTS

Thanks are due to Ministry of Industries and Mines ofIran and the Center of Excellence in Textile Engineeringof Amirkabir Uni. of Technology for support of thiswork.

Literature Cited

1. Abbate, A., Decusatis, C. M., and Das, P. K., “Waveletsand Subbands Fundamentals and Applications,” Birkhauser,Boston, 2002.

2. Amett, A. L., Texture Defect Detection Using SubbandDomain, in “IEEE Southwest Symposium on Image Anal-ysis and Interpretation,” 205–210 (1998).

3. Campbell, J. G., and Murtagh, F., Automatic Visual In-spection of Woven Textiles using a Two-stage DefectDetector, Opt. Eng. 37, 2536–2542 (1988).

4. Chan, C. H., and Pang, G., Fabric Defect Detection byFourier Analysis, IEEE Trans. Ind. Appl. 36, 1267–1276(2000).

5. Chellappa, R., and Chatterjee, S., Classification of Tex-tures Using Gaussian Markov Random Fields, IEEE Trans.On Acoust., Speech, Signal Processing. 33, 959–963(1985).

6. Cross, G., and Jain, A., Markov Random Field TextureModels, IEEE PAMI. 5, No. 1, (1983).

7. Dorrity, J. L., Vachtsevanos, G., and Jasper, W., Real-timeFabric Defect Detection and Control in Weaving Pro-cesses, National Textile Center Annual Report, 113–122November, 1996.

8. Escofet, J., Millan, M. S., Abril, H., and Torrecilla, E.,Inspection of Fabric Resistance to Abrasion by FourierAnalysis, Proc. SPIE 3490, 207–210 (1998).

9. Escofet, J., Navarro, R., Millan, M. S., and Pladelloreans,

J., Detection of Local Defects in Textiles Webs usingGabor Filters, Opt. Eng. 37, 2297–2307 (1998).

10. Jasper, W. J., Garnier, S. J., and Potapalli, H., TextureCharacterization and Defect Detection using AdaptiveWavelets, Opt. Eng. 35, 3140–3149 (1996).

11. Kim, S., Lee, M. H., and Woo, K. B., Wavelet Analysis toFabric Defects Detection in Weaving Processes, in “Proc.IEEE Int. Symp. Industrial Electronics” 3, 1406–1409(1999).

12. Kumar, A., and Pang, G., Fabric Defect Segmentationusing Multichannel Blob Detectors, Opt. Eng. 39, 3176–3190 (2000).

13. Kumar, A., and Pang, G., Identification of Surface Defectsin Textured Materials using Wavelet Packets, Proc. 36thIEEE/IAS Annual Meeting, Illinois, September, 2001.

14. Lambert, G., and Bock, F., Wavelet Methods for TextureDefect Detection, Proc. IEEE Intl. Conf. Image Process-ing. 3, 201–204, (1997).

15. Mufti, M., Fault Detection and Identification using FuzzyWavelets, PhD Thesis, Dept. of Electrical and ComputerEngineering, Georgia Institute of Technology, 1995.

16. Ravandi, S. A. H., and Toriumi, K., Fourier TransformAnalysis of Plain Weave Fabric Appearance, Textile Res.J. 65, 676–683 (1995).

17. Ribolzi, S., Merckle, J., and Gresser, J., Real-Time FaultDetection on Textiles using Opto- Electronic Processing,Textile Res. J. 63, 61–67 (1993).

18. Sari-Sarraf, H., and Goddard, J. S., Vision Systems forOn-loom Fabric Inspection, IEEE Trans. Ind. Appl. 35,1252–1259 (1999).

19. Tsai, D. M., and Heish, C. Y., Automated Surface Inspec-tion for Directional Textures, Image and Vision Comput.18, 49–62 (1999).

20. Tsai, I. S., and Hu, M. C., Automated Inspection of FabricDefects using an Artificial Neural Network Technique,Textile Res. J. 66, 474–482 (1996).

21. Zhang, Y. F., and Bresee, R. R., Fabric Defect Detectionand Classification using Image Analysis. Textile Res. J. 65,1–9 (1995).

JUNE 2005 497

by Ershad Khan on October 21, 2008 http://trj.sagepub.comDownloaded from