Sparavigna, A. (2017). Image Segmentation Applied to the Analysis of Fabric Textures. PHILICA.COM Article number 1157.
Image Segmentation Applied to the Analysis of Fabric Textures

Amelia Carolina Sparavignaunconfirmed user (Department of Applied Science and Technology, Politecnico di Torino)

Published in

In this work, we are proposing the use of image segmentation to the analysis of the textures of fabrics, with the aim of applying this approach to a fabric fault detection based on image processing.



                     Image Segmentation Applied to the Analysis of Fabric Textures

                      Amelia Carolina Sparavigna

                Department of Applied Science and Technology, Politecnico di Torino, Torino, Italy


Abstract: In this work, we are proposing the use of image segmentation to the analysis of the  textures of fabrics, with the aim of applying this approach to a fabric fault detection based on image processing.

Keywords:  Image Processing, Image Segmentation, Texture Analysis, Textiles, Fabric Fault Detection

To guarantee the quality of textile products as free from defects, the producers have to subject their fabrics to a specific visual inspection made by a trained staff. Sometimes the human inspection is supported by automatic inspection methods [1-3]. Some of these methods can also work during the production processes, that is, directly on the looms. Among the existing industrial inspection systems, let us remember the I-TEX from Elbit Vision Systems, the Barco Vision's Cyclops, and the Zellweger Uster's Fabriscan [4].
In spite of the presence of commercial systems, the research for further improvements of the methods for textile fault detection continues, as evidenced by the recent publications on this subject [5-10]. The reason for the necessity of further studies is motivated by the intrinsic difficulty of having an artificial vision of textiles; this difficulty consists in the fact that fabric faults are often very small and hardly detectable, having a visibility strongly dependent on illumination, reduced by the vibrations of the mounting devices [11-15].
For the analysis of fabric textures, several statistical approaches had been used and developed [16-17], and also methods based on the Fourier analysis, on the Gabor filtering and on wavelets with adaptive bases [18-21]. In addition, an approach based on an image processing, developed for the study of liquid crystals [22], was given in [23-25]. Recently we have also proposed the use of the GIMP Retinex filtering to enhance the visibility of defects [26] (other applications of the Retinex filtering to microscopy, radiography and detection of vehicles in foggy images have been given in [27-31]).
Here, we use another approach to the study of fabric textures, based on an image segmentation for evidencing and measuring the domains present in these textures. Before giving an example, let us discuss shortly the image segmentation.

Image Segmentation In image processing, a segmentation is a method of partitioning an image into multiple sets of pixels, defined as super-pixels, in order to have a representation, which can be simpler than the original one or more useful to the following desired analyses [32]. For this reason, the segmentation of images is used in several applications; in particular, it is used in the medical image processing for stacking and comparing diagnostic results [33-35].
A typical segmentation of an image is a method able to locate objects (the domains), which are present in the image frame, or the boundaries among the domains. Specifically, the segmentation is a process of assigning a label to every pixel in an image, such that the pixels having the same label share certain characteristics [35]. As a consequence, the result of a segmentation is a set of "segments", or “super-pixels”, that are covering the whole image, or a set of contours, that is of "edges", extracted from the image. In this case, the segmentation gives the "edge detection". Several methods exist for segmentation, as we can appreciate from [35].

Here we use a segmentation based on a thresholding of gray-scale images. By selecting a suitable threshold, the image is converted into a binary (black and white) image. In several cases, this is enough for evidencing the domains among the black or the white pixels. Details of the method of segmentation are given in [36]. In [37-42], we have demonstrated that this segmentation is suitable for the analysis of several textures, in particular, for those that we can define as “vesicular textures”, where some vesicles or voids or empty areas are present. Actually, some “empty” areas can be present in the images of a fabric because of the void among the yarns. Therefore, we can segment the images by considering these voids as the super-pixels. The presence of a defect in the fabric can be evidenced by a change in the distribution of the super-pixels. 

Segmenting a fabric texture Let us start the discussion of some examples by processing an image from the Brodatz Album (D103). We can artificially create a defect in it, as shown by the right panel of the Figure 1.


Figure 1: A fabric from Brodatz Album (D103) on the left, and the simulation of a defect on the right. Images are 600x600 pixels.

The two panels of Figure 1 are rendered into black and white images and segmented with the approach detailed in [36-42]. The result of the segmentation is shown in the Figure 2. Each black domain is evidenced in the segmentation by a different color tone (super-pixels). In the case of the “good” fabric, we use green tones; in the case of the “faulty” fabric, we use the red tones. Besides the maps, we can have the distributions of areas of the super-pixels. It is given in the Figure 3.


Figure 2: Segmentation of the images in Figure 1.



Figure 3: Distributions of areas of super-pixels, in green for the good fabric and in red for the faulty fabric. Areas are spaced in intervals of 10 pixels. N means “number”. There is a large number of super-pixels  containing about 200 pixels.


Figure 4: The same as in the Figure 3, represented by means of logarithmic scales.

From the Figure 3 (Figure 4 in logarithmic scales), it is evident that good and faulty fabrics have different distributions of the areas of super-pixels. The distribution of the “faulty” fabric shows the presence of several large domains, whereas the number of the small domains remained unchanged.  Since the difference is appreciable, we can imagine that it is possible to detect the presence of faults in the fabric texture by comparing the distribution we obtain from segmentation to a “standard” distribution corresponding to the good texture of the considered fabric.

Other examples Let us consider faulty textures discussed in [23]. Faults in the structure of woven fabrics are deviations from the recurrence of a fundamental unit, and usually appear as subtle lines, dark or bright, in the image frame. The more frequently encountered defects are broken or missing picks. Dust, extraneous staples or oil spots can also be observed.
The first defect we are proposing is the mispick. This is a rather common defect, produced when a yarn is lacking or broken on the loom. It is a defect expanding on the surface fabric and involving several neighbor yarns. Mispicks are easy to find by eye inspection, such as dust and little oil spots. These defects are eye-inspected with back lighting. The same illumination system was used to record images in the Figures 5 and 6 (left panels). In the Figure 5 we give a fabric and in the Figure 6 the same fabric with a mispick.

 Figure 5: Image of an almost good fabric on the left (600x600 pixels, 600 pixels correspond to 40 mm). In the middle, we see the corresponding binary image obtained by a threshold at the 111 grey-tone. On the right, the inverted image.  The black domains represent areas of the fabric, which are transmitting more light.


Figure 6: The same fabric of Figure 5 with a mispick (600x600 pixels, 600 pixels correspond to 40 mm). In the middle, we find the binary image obtained by a threshold at 111 grey-tone. On the right, the inverted image.  Here too the black domains represent areas that are transmitting more light.

The segmentation of the image on the right of Figure 5 gives us the “good” distribution that we can compare to the distribution coming from the segmentation of the right panel in the Figure 6. Figure 7 gives the maps resulting from the segmentation. On the left, the map is in green tones; on the right, in red tones. Again, the maps look quite different. The Figure 8 allows the comparison of the distributions.

Figure 7: Maps of the segmentation.



Figure 8: Distributions of areas of super-pixels (in logarithmic scale), in green for the good fabric and in red for the faulty fabric. The faulty texture contains several large super-pixels.

As previously observed for the image from Brodatz album, the distribution of areas of super-pixels obtained by means of an image segmentation allows to distinguish good and faulty textures.
Another fabric, where we found a defect (missing pick), is proposed in the Figures 9 and 10. In them, we see also the corresponding binary and inverted images. For both images, the threshold was chosen at the 177 grey-tone.  The maps after segmentation are given in Figure 11, and in the Figure 12 the distributions.


Figure 9: Another fabric. Images 600x600 pixels.


Figure 10: The missing pick. Images 600x600 pixels.



Figure 11: Maps of segmentation.


Figure 12: Distributions of areas of super-pixels (in logarithmic scale), in green for the fabric in Figure 10 and fabric in Figure 11. Again, distributions are quite different.

Conclusion As we have seen, the distributions are quite different. However, some points need to be investigated. among them, we have to find a method for the quantification of differences. This can be obtained by considering several images of the same textile, and investigating the corresponding set of distributions. Moreover, it is necessary to study the dependence of segmentation on the chosen threshold and also on physical conditions (illumination, contrast and noise). These seems being the main questions concerning the method, and that require further work. However, it is possible that during this work, other problems arise. In any case, the preliminary investigation here proposed is rather encouraging.

[1] Rosandich, R. G. (1997). Intelligent Visual Inspection. London, U.K., Chapman & Hall. ISBN: 9781461312017
[2] Kumar, A. (2008). Computer-Vision-Based Fabric Defect Detection: A Survey, IEEE Transactions on Industrial Electronics, 55(1), 348-363. DOI: 10.1109/TIE.1930.896476
[3] Nickolay, B. N., & Schmalfuß, H. (1993). Automatic fabric inspection—Utopia or reality? Melliand-Text.ber., 73, 33–37.
[4] Dockery, A. (2001). Automated fabric inspection: assessing the current state of the art. Available at the site
[5] Jing, J.,  Zhang, H. ,  Wang, J.,  Li, P., &  Jia, J. (2013). Fabric defect detection using Gabor filters and defect classification based on LBP and Tamura method. Journal of the Textile Institute, 104(1), 18-27. DOI: 10.1080/00405000.2012.692940
[6] Schneider, D., Holtermann, T., & Merhof, D. (2014). A traverse inspection system for high precision visual on-loom fabric defect detection. Machine vision and applications, 25(6), 1585-1599.DOI: 10.1007/s00138-014-0600-y
[7] Bhangale, R. S., & Zope, C. D. (2014). An Introduction to Textile Defect Identification and Classification Using Wavelet Transform and Neural Networks. International Journal of Advanced Electronics and Communication Systems. Proceedings of the Int. Conference on Modeling and Simulation in Engineering & Technology (ICMSET-2014), 15th - 16th February 2014.
[8] Li, P., Zhao, Z., Zhang, L., Zhang, H., & Jing, J. (2015). The Real-Time Vision System for Fabric Defect Detection with Combined Approach. In International Conference on Image and Graphics (pp. 460-473). Lecture Notes in Computer Science. Springer International Publishing. DOI: 10.1007/978-3-319-21969-1_41
[9] Huang, C. P. (2014). A Study on the Algorithm of  Fault  Information Automatic Detection for High-Precision Intelligent Instruments. Advanced Materials Research, 846, 167-171. DOI: 10.4028/
[10] Jinlian Hu (2011). Computer Technology for Textiles and Apparel,  Elsevier. ISBN: 9781845697297
[11] Sari-Sarraf, H., & Goddard, J. S. (1999). Vision systems for on-loom fabric inspection, IEEE Trans. Industry applications, 35, 1252-1259. DOI: 10.1109/28.806035
[12] Campbell, J. G., & Murtagh, F. (1998).  Automatic vision inspection of woven textiles using a two-stage defect detector, Opt. Eng. 37, 2536-2542. DOI: 10.1117/1.601692
[13] Yau, H. F.,  Chen, P. W., Wang, N. C., & Lay, Y. L. (1998). Optimization of the illumination beam size of an optical textile defect inspection system, Meas. Sci. Technol. 9, 960-966. DOI: /10.1088/0957-0233/9/6/013
[14]  Ribolzi, S., Merckle, J., Gresser, J., &  Exbrayat, P. E.   (1993).   Real  time  fault   detection on textiles using opto-electronic processing, Textile Res. J. 63, 61-71. DOI: 10.1177/004051759306300201
[15] Kasdan, H. L. (1979). Industrial application of diffraction pattern sampling, Opt. Eng. 18, 496-503. DOI: 10.1117/12.7972419
[16] Haralick, R. M., Shanmugam, K., & Dinstein, I. (1973). Textural features for image classification, IEEE Trans. Syst., Man, Cybern., SMC-3, 610-21. DOI: 10.1109/tsmc.1973.4309314
[17] Abouelela, A., Abbas, I., El Deeb, I., & Nassar, S. (2000). A statistical approach for textile fault detection, IEEE International Conference on Systems, Man, and Cybernetics, 8-11 Oct. 2000,  4, 2857-2862. DOI: 10.1109/icsmc.2000.884431
[18] Chan, C. H., & Pang,  G. (2002). Fabric defect detection by Fourier analysis, IEEE Transactions on Industry Applications, 36, 1267-1276. DOI: 10.1109/28.871274
[19] Arivazhagan, S., Ganesan, L., & Bama, S. (2006). Fault segmentation in fabric images using Gabor wavelet transform. Machine Vision and Applications, 16(6), 356-363.
[20] Kumar, A., & Pang, G. K. H. (2002). Defect detection in textured materials using Gabor filters, Industry Applications, IEEE Transactions on Industry Applications, 38, 425-440. DOI: 10.1109/28.993164
[21] Jasper, J. W., Garnier, S. J. & Potlapalli, H. (1996). Texture characterization and defect detection using adaptive wavelets,  Opt. Eng., 35, 3140-3149. DOI: 10.1117/1.601054
[22] Montrucchio, B., Sparavigna, A., & Strigazzi, A. (1998). A new image processing method for enhancing the detection sensitivity of smooth transitions in liquid crystals, Liq. Cryst., 24, 841-852. DOI:  10.1080/026782998206669
[23] Sparavigna, A. C., & Montrucchio, B. (2006). Performing Textile Fault Detection by Means of Texture Analysis. WSEAS Transactions on Signal Processing, 2, 541-548.
[24] Sparavigna, A., & Montrucchio, B. (2006, April). Texture analysis for textile fault detection. In Proceedings of the 5th WSEAS international conference on Applied computer science (pp. 861-866). World Scientific and Engineering Academy and Society (WSEAS).
[25] Sparavigna A., Dorma, G. &  Montrucchio, B. (2006). Diffractive optics for fabric fault detection, pp. 82-88, Vol. 5, SCI2006 - X World Multi-Conference on Systemics, Cybernetics and Informatics, Orlando, Florida, July 16-19.
[26] Sparavigna, A. C., & Marazzato, R. (2017). The GIMP Retinex Filter Applied to the Fabric Fault Detection. International Journal of Sciences, 6(03), 106-112.
[27] Sparavigna, A. C. (2015). GIMP Retinex for enhancing images from microscopes. International Journal of Sciences, 4(6), 72-79. DOI: 10.18483/ijsci.758
[28] Sparavigna, A. C., & Marazzato, R. (2015). Effects of GIMP Retinex Filtering Evaluated by the Image Entropy. arXiv preprint arXiv:1512.05653.
[29] Marazzato, R., & Sparavigna, A. C. (2015). Retinex filtering of foggy images: generation of a bulk set with selection and ranking. arXiv preprint arXiv:1509.08715.
[30] Sparavigna, A. C., & Marazzato, R. (2016). Evaluation of GIMP Retinex Filtering of Images by Means of the Shen++Max Shannon Entropy Finder.
[31] Sparavigna, A. C. (2015). An image processing approach based on Gnu Image Manipulation Program GIMP to the panoramic radiography. International Journal of Sciences, 4(5), 57-67. DOI: 10.18483/ijsci.721
[32] Shapiro, L. G., & Stockman, G. C. (2001). Computer vision, New Jersey, Prentice-Hall, ISBN 0-13-030796-3
[33] Pham, D. L., Xu, Chenyang, & Prince, J. L. (2000). Current methods in medical image segmentation. Annual Review of Biomedical Engineering.  2: 315–337. DOI: 10.1146/annurev.bioeng.2.1.315.  PMID 11701515.
[34] Forghani, M., Forouzanfar, M., & Teshnehlab, M. (2010). Parameter optimization of improved fuzzy c-means clustering algorithm for brain MR image segmentation. Engineering Applications of Artificial Intelligence, 23 (2), 160–168. DOI: 10.1016/j.engappai.2009.10.002
[35] Vv. Aa. (2016). Wikipedia.
[36] Sparavigna, A. C. (2017). Image Segmentation Applied to the Study of Micrographs of Cellular Solids. Int. Journal of Sciences, 6(02), 68-76. DOI: 10.18483/ijSci.1201
[37] Sparavigna, A. C. (2016). A method for the segmentation  of  images  based  on  thresholding     and applied to vesicular textures.  Philica 2016, 889. Bibliographic Code:
[38] Sparavigna, A. C., Pisano, R., & Barresi, A. A. (2017, June). Measuring the size of pores by the segmentation of images from scanning electron microscopy. In 6th European Drying Conference (EuroDrying 2017).
[39] Sparavigna, A. C. (2017). Measuring the particles in fly ash by means of an image segmentation. Philica, 2017, 1105.
[40] Sparavigna, A. C. (2016). Analysis of a natural honeycomb by means of an image segmentation. Philica, 2016, n.897.
[41] Sparavigna, A. (2017). Image segmentation applied to micrographs of microcellular plastics. Philica, 2017, n.953.
[42] Sparavigna, A. (2017). Measuring the size of tubules in phloem and xylem of plants. Philica, 2017, 1104.


Information about this Article
This Article has not yet been peer-reviewed

Published on Friday 10th November, 2017 at 18:53:27.

Creative Commons License
This work is licensed under a Creative Commons Attribution 2.5 License.
The full citation for this Article is:
Sparavigna, A. (2017). Image Segmentation Applied to the Analysis of Fabric Textures. PHILICA.COM Article number 1157.

Website copyright © 2006-07 Philica; authors retain the rights to their work under this Creative Commons License and reviews are copyleft under the GNU free documentation license.
Using this site indicates acceptance of our Terms and Conditions.

This page was generated in 0.0126 seconds.