Fabric Defect Detection using Image Processing

Send Message

To: Author

Fabric Defect Detection using Image Processing

Article Fingerprint

ReserarchID

808UU

Fabric Defect Detection using Image Processing Banner

Key Research Insights

Synthesized scholarly intelligence & interactive research assistant
  • English
  • Afrikaans
  • Albanian
  • Amharic
  • Arabic
  • Armenian
  • Azerbaijani
  • Basque
  • Belarusian
  • Bengali
  • Bosnian
  • Bulgarian
  • Catalan
  • Cebuano
  • Chichewa
  • Chinese (Simplified)
  • Chinese (Traditional)
  • Corsican
  • Croatian
  • Czech
  • Danish
  • Dutch
  • Esperanto
  • Estonian
  • Filipino
  • Finnish
  • French
  • Frisian
  • Galician
  • Georgian
  • German
  • Greek
  • Gujarati
  • Haitian Creole
  • Hausa
  • Hawaiian
  • Hebrew
  • Hindi
  • Hmong
  • Hungarian
  • Icelandic
  • Igbo
  • Indonesian
  • Irish
  • Italian
  • Japanese
  • Javanese
  • Kannada
  • Kazakh
  • Khmer
  • Korean
  • Kurdish (Kurmanji)
  • Kyrgyz
  • Lao
  • Latin
  • Latvian
  • Lithuanian
  • Luxembourgish
  • Macedonian
  • Malagasy
  • Malay
  • Malayalam
  • Maltese
  • Maori
  • Marathi
  • Mongolian
  • Myanmar (Burmese)
  • Nepali
  • Norwegian
  • Pashto
  • Persian
  • Polish
  • Portuguese
  • Punjabi
  • Romanian
  • Russian
  • Samoan
  • Scots Gaelic
  • Serbian
  • Sesotho
  • Shona
  • Sindhi
  • Sinhala
  • Slovak
  • Slovenian
  • Somali
  • Spanish
  • Sundanese
  • Swahili
  • Swedish
  • Tajik
  • Tamil
  • Telugu
  • Thai
  • Turkish
  • Ukrainian
  • Urdu
  • Uzbek
  • Vietnamese
  • Welsh
  • Xhosa
  • Yiddish
  • Yoruba
  • Zulu
Reading Preferences
Font Size
Line Spacing
Background

Abstract

Fabric defect is one of the most important and serious matters of quality control in textile industry in Bangladesh. This task takes a lot of time and money. For this reason we have introduced a simple process to find defects on fabric based on edge detection. This process is mainly focused on image processing which can be integrated with fabric defect detection automation system. In this paper we have tried a new approach using the filter method with edge detection and found good results. Our algorithm can detect defected fabric area successfully. It can be also used in real-time defect detection considering light intensity, zoom, fabric width, camera resolution etc. As our algorithm mainly works on the principle of edge detection, it cannot detect defect on multicoloured or patterned fabric. It works well on single coloured fabric without any fold or edge.

I. INTRODUCTION

As we entered in digital age, our information has improved better than ever. In the textile industry, fabric defect is one of the most important and the first task of quality control and economy business. So many approaches have made in the field of fabric defect detection. In Bangladesh, textile industries are trying to improve their production with minimum cost. After the waving of a huge roll of fabric, it's then sent for inspection to find if there is any defect on the fabric. An automated fabric defect detection system would be better than human detection which will alert users when any error found [1].

So many researchers have been made to identify fabric defect methods. Some methods are well established. Structural, statistical, spectral, model-based, learning, hybrid, comparison studies, optical analysis methods and image analysis methods are more common. Some researchers have tried Fourier Transform and Gabor Filters; others use Gabor and HOG in the image analysis method, which is more complex and time-consuming. But we have tried a simple method using edge detection and heuristics. This paper has focused on single colour-based fabric defect detection using image processing. We have experimented with different edge detection algorithms, e.g. Sobel, canny etc. along with noise filter and different threshold. Above those, canny edge detection shows more promising results in fabric defect detection. A simple algorithm is proposed here to detect different kinds of fabric defects. Our goal is to find a more cost-effective and fast process to identify fabric defects accurately. Some parameter like zooming, image resolution, colour etc should be considered. Main fabric defects as namely[3,4]Floats, Weft Curling, Slubs, Holes, Oil Stains, Stitching, Knots, Irregular Pick Density, Snag, Tear, Gouts, Snarls, Miss-end, Stripes, Tight/Slack Warp Thread, Double Ends, Smash, Open Reed, Miss-pick, Double Picks, Coarse-pick, Tight/Slack Weft Thread etc. All of these defects are examined with our algorithm and the result comes out very good and promising with some considerations.

II. OBJECTIVE

Different work has been done in previous year for fabric defect detection. And so many methods are being proposed. A direct benchmark among different algorithms for fabric flaw detection was first and last conducted by Bodnarova et al. [5], who compared algorithms based on the ideas of co-occurrence matrices, normalized cross-correlation, blob detection and spectral analysis. All algorithms were manually implemented by the authors. Almost all papers somehow combine a basic method with several other advanced techniques. Some tried to classify the defect and others tried real-time defect detection with accurate position of defect.

The objective of this paper is to find different approaches to find a better method to detect fabric defects using image processing. Many tried to classify these defects; others tried to compare existing methods. But my method does not classify the error type. It can only determine if there is any defect that exists in the given fabric image.

III. PROPOSED METHOD

The objective of the proposed method in this paper is to design an efficient method for fabric defect detection with image. In this section we will discuss fully our method. Matlab software is used for this purpose. We have used a filter-based edge detection method and heuristic to predict if the fabric image contains any errors. If an error is found, then the software shows error found and if not then it shows no error found. This algorithm is designed to perform better in single-color fabrics. Texture and printed fabrics are not suitable. Due to the increasing demand for quality fabrics, high quality requirements are today greater since customers have become more aware of poor quality problems. To avoid rejection of fabric, it is necessary to avoid defects.

At first RGB image is taken as an input. This is the test image. It may not contain any errors. Different types of fabric are used for testing. Then the image is converted into a grayscale image. Image is now converted to a n×m matrix. Now take the mean of the image matrix. This value is essential for image pixel equalization. We subtract 100 from this mean value and subtract from every pixel in the gray image. This is done because subtracting from every pixel it will be more efficient for applying thresholds. Now we convert this grayscale image into a binary image. The pixel values are now in 0s and 1s. If the value falls below the threshold value, the pixel value will become 0 and if the value falls above the threshold value, the pixel value will become 1. Then we apply edge detection to the image. A Canny Edge detection algorithm is used here. After that objects are formed in the image. We now remove noise from the image. If any small object contains 2px by 2px or less, we will remove it from the image. As all image pixels do not contain the same rgb or gray value. Noise removal is very important to our method. Without this we cannot find accurate results. If an image does not contain any error, though we can find some small object as noise, that's some value will still remain above threshold. We keep all larger objects and count them. Error can be any size and any length. Finally, we compare the number of remaining objects. If the number is greater than 10 then we can say the image has error otherwise no error. This is the heuristic value. This value can be less than 10 if we want to get a more accurate result, it will then detect some false result.

a) Flowchart of method

b) Some Considerations

This algorithm is not for patterned fabric or wool. This will work better in single-colored fabrics like cotton or silk. The light intensity should be the same for all over the image and there should not be any stretch. When the picture is taken it should not be so close to the fabric or the image should not be zoomed.

c) RGB image Input

Image pixels contain values in RGB. In matlab it forms a three-dimension matrix. The main purpose of the RGB color model is for the sensing, representation and display of images in electronic systems, such as televisions and computers, though it has also been used in conventional photography.

Fig -1: RGB image with error (source google.com)
Fig -1: RGB image with error (source google.com)

If we zoom in on this image, we can understand the pixels inside it.

Fig -2: Zoomed image with RGB value
Fig -2: Zoomed image with RGB value

d) RGB to Gray Conversion

Convert each pixel value to a gray level by the following equation.

( 0. 2 9 9 R + 0. 5 8 7 G + 0. 1 1 4 B )

To convert RGB image into a binary image, this gray level conversion is needed. Grayscale image contains values from 0 to 255. And the image is formed into two dimensional arrays of pixel values.

Fig -3: Gray Scale Image
Fig -3: Gray Scale Image

e) Mean and subtracting

Calculate the mean of the grayscale image. Take each pixel value and sum them. And divide the sum with total number of pixel. The equation is-

 Mean  = ( n 1 + n 2 + n 3 + . + n N ) / N

Here n1,n2... are the pixel values and N is the total number of pixel. We subtract 100 from this value and finally subtract each pixel value from the gray image. We normalize the image so that the intensity level is distributed all over the pixel value. Now we remove noise from this image by applying a wiener filter.

f) Convert to binary image

Computes a threshold for each pixel using the local mean intensity around the neighborhood of the pixel. This is done by the following equation 2*floor (size(l)/16) + 1

Fig -4: Binary image
Fig -4: Binary image

Binary image is needed for edge detection and separate different size objects. This image contains only 0 and 1 value.

g) Removing and filtering object

Remove all objects less than 2px. This is noise removal. Any pixel not associated with object will be removed. We have used a Wiener noise removal filter in this paper. The purpose of the Wiener filter is to filter out noise that has corrupted image. This filter is based on a statistical approach. The goal of the wiener filter is to reduce the mean square error as much as possible. Replacing each pixel value in an image with the mean value of its neighbors, including itself [6].

h) Decision making

We will keep all the larger objects in the image. If the number is below 10, we will assume that the fabric is defect free. And if the number is greater than 10, we will assume there is a defect in the fabric image.

IV. ANALYSIS AND DISCUSION

a) Experiment on different sample image

Fig -5: Test image 1
Fig -5: Test image 1

The first test image contains a hole error. The error area is marked red.

Fig -6: Test image 2
Fig -6: Test image 2

Second image contains a error color marking/tag.

Fig -7: Test image 3
Fig -7: Test image 3

Third image contains pilling the dot/ball in the image.

Fig -8: Test image 4
Fig -8: Test image 4

Forth image also contains hole defect. Fig-9: Test image 5

This image contains oil strain. The red marked area is error.

Fig -10: Test image 6
Fig -10: Test image 6

This image contains a error tight weft thread. The area is marked red.

Fig -11: Test image 7 The above image does not contain any error. The algorithm found it correctly. 50 different images are given as input. These sample images contain different errors and different colors. Only one image was not identified correctly. Among the 50 images, 49 were identified correctly. So we can tell that the accuracy level is (49/50)*100=98\% which is very good.
Fig -11: Test image 7 The above image does not contain any error. The algorithm found it correctly. 50 different images are given as input. These sample images contain different errors and different colors. Only one image was not identified correctly. Among the 50 images, 49 were identified correctly. So we can tell that the accuracy level is ( 49 / 50 ) 100 = 98 % which is very good.

b) Comparative Analysis of Fabric Defects Detection Methodologies Compared to other fabric defect detection methods [ 7 ] we found our algorithm to be better in certain conditions.

TechniqueAccuracyTotal Fabric Samples and Defect Types
Gabor Wavelet Filter Methodology96% with 3.2% of False Rate71 fabric images (39 of them are defect-free), more than 30 types of defects are tested.
Methodology of Wavelet-Texture Analysis and LVQ Neural NetworkThe accuracy of Identification is on average of 7 type of defects is 95%Total 350 images with 7 types of defects (including wrap missing, weft missing, double weft, materialize bar, oil pigment, hole, non defected)
Usage of Computer-Vision and Artificial Neural NetworkOverall average is 77%. Average identification for hole is 72%, for Scratch is 65%, ForTotal 200 images. Trained to 4 types of defects (Hole, Scratch, Other, and no-fault)
other faults 86% and for no faults is 83%.
Methodology of Digital Image Analysis83% AccuracyTotal 2000 Rotations
Our proposed method98% with 2% false detectionTotal 50 image with different defect image

V. CONCLUSION

The objective of our project was to find defects in fabric using image processing. The method we used is fast and very accurate. With low false detection, it will help textile industries to save time and money. It only works better with single-colored fabric. With few considerations, our method performs better and detection rate is 98% which is much satisfactory.

VI. FUTURE WORK

Many methods exist in the field of fabric defect detection. These methods are suitable for fabric only. But as our method is based on edge detection and it can also be used in other fields like vein detection or printed circuit board (PCB) defect detection. Some false detection is present in the experiment. We will try to improve the result in future.

Funding

No external funding was declared for this work.

Conflict of Interest

The authors declare no conflict of interest.

Ethical Approval

No ethics committee approval was required for this article type.

Data Availability

Not applicable for this article.

How to Cite This Article

Md. Rakibul Alam Khan, Halima Akhter. 2026. "Fabric Defect Detection using Image Processing". Global Journal of Computer Science and Technology - G: Interdisciplinary GJCST-G Volume 22 (GJCST Volume 22 Issue G1).

Download Citation

Fabric Defect Detection, Image Processing, Quality Control, Textile Industry, Research.
Journal Specifications

Crossref Journal DOI 10.17406/gjcst

Print ISSN 0975-4350

e-ISSN 0975-4172

Keywords
Classification
GJCST-G Classification I.4.0
Version of record

v1.2

Issue date
May 21, 2022

Language
English
Experiance in AR

Explore published articles in an immersive Augmented Reality environment. Our platform converts research papers into interactive 3D books, allowing readers to view and interact with content using AR and VR compatible devices.

Read in 3D

Your published article is automatically converted into a realistic 3D book. Flip through pages and read research papers in a more engaging and interactive format.

Article Matrices
Total Views: 957
Total Downloads: 57
All Trends

Request Access

Please fill out the form below to request access to this research paper. Your request will be reviewed by the editorial or author team.
X

This is the heading

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.

High-quality academic research articles on global topics and journals.

Fabric Defect Detection using Image Processing

Md. Khan
Md. Khan
Halima Akhter
Halima Akhter