Skip links
Purple Blue Gradient User Persona Presentation 1 1

Online Detection of Warp-Knitted Fabric Defects on a Fabric Winding Machine

Share
Abstract

The textile industry relies heavily on quality control to maintain standards and reduce production waste. Manual defect inspection is a common approach but is prone to human error. This study presents a real-time automated fabric defect detection system using Python programming and the OpenCV library. The system performs video analysis and allows selection of a Region of Interest (ROI) to identify defects such as horizontal lines (yarn breakage) and vertical lines (machine stop marks). By integrating preprocessing, thresholding, and line detection, accurate identification of defects in moving fabrics is ensured. Experimental results demonstrate the effectiveness of the system and highlight its potential to revolutionize the country’s textile production by improving accuracy, reducing waste, and increasing efficiency.

1. Introduction

The textile industry plays an important role in the global economy. One of the biggest challenges this industry faces is ensuring consistent quality, since defects such as irregular patterns and yarn break lines can significantly affect the usability and appearance of the final product. Traditionally, fabric inspection has been a manual process relying on trained personnel for visual identification of defects. However, manual inspection is inherently limited by human factors such as fatigue, inconsistency, and subjectivity, which leads to missed defects and increased production costs [1, 2].

The emergence of computer vision [1] technologies has provided an opportunity to automate quality control processes in textile manufacturing. Computer vision enables machines to analyze visual data in real-time [2] and detect patterns and anomalies faster and more accurately than human inspectors. Studies have shown that automated defect detection systems can reduce inspection time and improve accuracy, making them an attractive alternative to manual methods [1, 3].

In recent years, image processing techniques have been successfully used to identify specific types of fabric defects, such as holes, stains, and yarn irregularities [1]. Among these, detection of continuous horizontal and vertical lines is of particular importance, as such defects often indicate structural issues in the fabric weaving process. Detecting these defects in real time can prevent further advancement of defective fabric along the production line, thereby reducing waste and saving costs [4, 5].

This study presents a real-time fabric defect detection system that uses Python programming to analyze video footage of moving fabric. The system allows the user to define a specific Region of Interest (ROI) [3] for defect detection, ensuring focus on critical areas of the fabric. Using methods such as grayscale conversion, Gaussian blurring [4], adaptive thresholding [5], and line detection, the system identifies continuous horizontal and vertical line defects with high accuracy.

2. Materials and Methods

In this section, the materials, tools, and methods used in this research are described.

2.1. Hardware Used

In this research, a Samsung Galaxy A13 [6] mobile phone camera was mounted on a fixed stand to capture vertical video of warp-knitted tricot fabric (three-guide-bar, plain structure) while passing over the fabric inspection/winding machine. The recorded images were transmitted in real time to a computer with sufficient processing power for real-time video analysis.

2.2. Software Used

The Python programming language, the OpenCV library [7] for image processing, and Visual Studio Code [8] as the source code editor for developing and running the Python code were used.

2.3. Methods

The defect detection system includes the following steps:

Video input and ROI selection for defect identification: The user defines a Region of Interest on the fabric where defects should be detected.

Preprocessing: Image data are simplified by removing color information (conversion to grayscale). Noises [9] are reduced by applying a Gaussian filter, which smoothens [10] the image to improve separation of defects. Adaptive thresholding converts the image into a binary [11] format and highlights potential defect regions.

Defect detection: Connected components analysis filters out small and irrelevant disturbances while preserving larger meaningful structures. The Hough Transform [12] algorithm identifies continuous horizontal and vertical lines, which are visualized in green and red, respectively.

Output: The processed video is displayed in real time, and defects are marked for easy identification.

3. Results and Discussion

The proposed system was tested on warp-knitted tricot fabric samples on a fabric winding/inspection machine within the factory production line. The following observations were made:

3.1. Defect Detection Accuracy

Results were evaluated based on metrics such as accuracy (ratio of detected defect regions to all existing defect regions), sensitivity (the length of defect detected after it enters the ROI), and false positive rate (percentage of defect-free regions incorrectly detected as defective). The system successfully identified horizontal line defects (yarn breakage) and vertical line defects (machine stop marks) with 100% accuracy on the tested samples, an average sensitivity of less than 2 cm, and false positives below 1%. Small disturbances and irrelevant patterns were effectively removed using connected components analysis.

3.2. Real-Time Processing

The system achieved real-time processing speed and handled frame processing in accordance with the high speed of the fabric winding machine.

3.3. Visualization

Defects were clearly marked, helping operators quickly identify and address fabric defects. Horizontal defects were highlighted in green and vertical defects in red for easy differentiation. Figure 1 shows detected fabric defects and processing steps. As shown in this figure, the system successfully identified defects (Figure 1-d and 1-e). In addition, despite fabric surface unevenness, wrinkles were not detected as defects, indicating high accuracy in distinguishing surface irregularities from actual defects.

تصویر یک قاب از خروجی دوربین وارد شده به برنامه %D8%A8 %D9%BE تصویر خطوط عیوب افقی و عمودی تشخیص شده %D8%AB %D8%AC
(A) (B) (C) (D) (E) (F)

 

Figure 1. (a) A frame from the camera input to the program, (b) binary image without Gaussian filtering, (c) binary image after applying Gaussian filtering, (d) detected horizontal and vertical defect lines, (e) detected defects in the next frame, (f) a frame of defect-free fabric.

3.4. Advantages and Challenges

Automated detection significantly reduces inspection time compared to manual methods. Unlike previous studies that mainly used neural networks and deep learning techniques, the proposed method achieved real-time performance using simpler algorithms (Hough Transform and connected components analysis). In previous research, fabric defect detection has often been performed as classification of defective versus healthy fabric images, and in cases addressing real-time detection, the focus has mostly been on lower-speed machines; whereas the system in this study was tested on a fabric winding machine, which has one of the highest fabric movement speeds in the production line. The system delivered acceptable performance for different types of warp-knitted fabrics with full and partial yarn breakage, demonstrating its adaptability for implementation in different production lines with minimal modifications. It should be noted that previous real-time fabric defect detection studies have been mostly focused on woven fabrics and circular knitted fabrics. The lack of need for advanced hardware or complex neural network processing makes this system an economically suitable option.

It should also be noted that poor lighting conditions or rapid lighting changes reduce system accuracy and sensitivity and increase false positive results. Additionally, to detect defects with characteristics different from those studied here, the system requires further improvement. Some system parameters still require manual tuning, which may be a limitation in changing environments.

4. Conclusion

This study demonstrates the capability of real-time fabric defect detection using sensing and computer vision. By automating the process, the system overcomes limitations of manual inspection and provides consistent, accurate, and efficient defect detection. The integration of advanced image processing methods ensures precise identification of horizontal line defects (yarn breakage) and vertical line defects (machine stop marks). Future improvements, including machine learning-based defect classification and integration with the Internet of Things, can further expand system capabilities. Real-time defect detection is an important step toward smarter textile manufacturing, offering significant benefits in quality control, cost savings, and sustainability.

Acknowledgments

The authors express their gratitude and appreciation to the Jahan Urum Ayaz Company for cooperation in conducting the experiments on the company’s fabric production line.

References

Kayumov, A., Sobirov, M., & Musayev, K. (2024). Methods of fabric defect detection using expert systems-a systematic literature review. In E3S Web of Conferences (Vol. 538, p. 04015). EDP Sciences.
Meeradevi, T., Sasikala, S., Gomathi, S., & Prabakaran, K. (2023). An analytical survey of textile fabric defect and shade variation detection system using image processing. Multimedia Tools and Applications, 82(4), 6167–6196.
Yousefzadeh, M., Payvandy, P., Seyyedsalehi, S. A., & Latifi, M. (2006). DEFECT DETECTION AND CLASSIFICATION IN NONWOVEN WEB IMAGES USING NEURAL NETWORK.
Saeidi, R. G., Latifi, M., Najar, S. S., & Saeidi, A. G. (2005). Computer vision-aided fabric inspection system for on-circular knitting machine. Textile Research Journal, 75(6), 492–497.
Mahmud, T., Sikder, J., Chakma, R. J., & Fardoush, J. (2021). Fabric defect detection system. In Intelligent Computing and Optimization: Proceedings of the 3rd International Conference on Intelligent Computing and Optimization 2020 (ICO 2020) (pp. 788–800). Springer International Publishing.

English Equivalents

[1] Computer vision

[2] Real-Time

[3] Region of Interest (ROI)

[4] Gaussian blurring

[5] Adaptive thresholding

[6] Samsung Galaxy A13

[7] OpenCV

[8] Visual Studio Code

[9] Noises

[10] Smoothens

[11] Binary

[12] Hough Transform

Leave a comment