i-manager's Journal on Pattern Recognition

View PDF

Volume :2 No :4 Issue :-2016 Pages :11-17

An Automated Fabric Fault Detection using a Microcontroller

A. Selvarasi
*PG Scholar, Department of Electronics and Communication Engineering, CK College of Engineering and Technology, Cuddalore, India.

Abstract

Textile industries are one of the major revenue generating industries in Tamil Nadu, India. Greater efforts are taken in manufacturing the good quality fabrics. Defects in a fabric are a major issue to the textile industry. Textile industries in Tamil Nadu initially had only manual inspection strategy for the detection of faults. Later, automation has been made through image processing techniques. Traditional inspection process for fabric defects is by human visual inspection, which is inefficient, costly and time consuming. To enhance the accuracy of fabric defects detection, and help people out from this tedious and stressful work, an automated fabric inspection system has been proposed. To automate this process, the fault present on the fabrics can be identified using MATLAB with Image processing techniques and the implementation of this idea is done in Arduino kit for real time applications.

Keywords :

  • Arduino,
  • Fabric Fault Classification,
  • Image Processing,
  • MATLAB,
  • Morphological Operators.

Introduction

Textile industries are one of the fastest growing and competitive markets worldwide and form a major part of production, manufacturing, and employment in many developing countries. The textile industry internationally has experienced dramatic technological changes during the last few decades. The changes have increased both the yields and quality of fabrics, apart from reducing the expenses and labor costs. This paper focuses on proposing both motif and non-motif based techniques that use amalgamation of image processing to detect defects from the patterned fabrics.

1. Objectives

  • The purpose of this paper is to improve the fabric quality level by detecting all types of defects during production with reduced computational cost and time.
  • Elimination of human drawbacks such as, errors and/or subjective judgment.
  • Increasing the manufacturer's credibility & Elimination of labour problem.
 

2. Literature Review

Traditionally, this fabric fault detection was performed by well- trained human inspectors [1]. When the inspector notices a defect on the moving fabric, he stops the machine, records the defect and its location, and starts the motor again. Therefore, automatic inspection systems were introduced to achieve 100% accuracy [4]. Unfortunately, most of the used algorithms are computationally complex for online applications, where they classified the algorithm into four categories. They are:

  • Structural Approaches,
  • Statistical Approaches,
  • Spectral Approaches, and
  • Model Based Approaches.
 

2.1 Structural Approaches

Structural Approaches uses Primitives. Kumar A. (2008) [2] described that these primitives can be as simple as single pixels. Consequently, the main objective of these approaches is firstly to get these primitives, and secondly to generalize the spatial placement rules. However, these approaches were not successful due to noise and the like.

2.2 Statistical Approaches

Statistical Approaches measure the Spatial Distribution of Pixel Values. Mahajan P.M et al.(2009) [3] defines that their main objective is to separate the image of the inspected fabric into the regions of distinct statistical behavior.

2.3 Spectral Approaches

Spectral Approaches are less sensitive to noise and intensity variations than other approaches. Priyanka Vyas and Manish Kakhani (2015) [6] says that, the primary objectives of these approaches are to get the primitives, and to model or generalize the spatial placement rules.

2.4 Model-based Approaches

Model-based approaches in this analysis method, models the texture by finding the parameters of predefined model. Malamas E. N et al. (2003) [5] defined that the task is difficult, if a large number of models must be considered.

From this survey, it is concluded that there is a need for a consistent way to produce defect-free fabrics.

3. Fabric Defect and its Types

Rajalakshmi and Selvarasi (2015) [11] defined some of the fabric defect types, which are listed below:

3.1 Oil Spot

A fabric area may contains oil spots. It is caused by too much oiling on loom parts or from other external sources. It is shown in Figure 1.

Figure 1. Oil Spot

3.2 Scratch

Damaged fabric portions differ from holes that has a random uneven shape. It is shown in Figure 2.

Figure 2. Scratch

3.3 Irregular Pick Density

It is a mechanical fault caused by an irregular beating up force. It is shown in Figure 3.

Figure 3. Irregular Pick Density

3.4 Float

A portion of a yarn in a fabric that extends or floats, unbounds, over two or more adjacent picks. It is shown in Figure 4.

Figure 4. Float

3.5 Hole

A fabric area free of both the warp and weft threads. It can happen due to the sharp edge of machine parts. It is shown in Figure 5.

Figure 5. Hole

4. Detection Algorithm

The proposed system for software design is shown in Figure 6. It consists of various stages.

4.1 Image Acquisition

Textile/fabric surface image is acquired by using the CCD camera from top of the surface from a distance adjusted so as to get the best possible view of the surface. Originally, the images are acquired at RGB color scale.

4.2 Filtering

The impulse noise is the most frequently referred type of noise. This noise, commonly also known as salt & pepper noise, is caused by the malfunctioning pixels in the camera sensors. Median filtering is considered a popular method to remove impulse noise from images.

4.3 Histogram Processing

A histogram is a graphical representation of the distribution of data. A histogram output obtained from the overall processing is used for drawing the conclusions for fault classification.

4.4 Noise Removal

Digital images consist of many types of noise. Noise is the result of errors in the image acquisition process. This phase basically deals with the removal of external noise and disturbances in the image.

4.5 Thresholding

Binary images are easy to operate, than other storage format images. The purpose of thresholding is to extract those pixels from some image which represent an object.

4.6 Binary Image

Jagruti Mahure and Kulkarni (2013) [7] described that it is a digital image that has only two possibilities for each pixel. Typically, two colors used for a binary image are black and white. Each pixel is stored as a single bit, i.e. 0 or 1.

4.7 Morphological Operations

Morphological image processing is a collection of nonlinear operations related to the shape or morphology of the features in an image. Morphological operations rely only on the relative ordering of the pixel values.

4.8 Training and Classification

Dr. G.M. Nasira and Banumati (2013) [8] described that, Artificial neural networks inspired by the animal's central nervous systems, are presented as the system of interconnected neurons and used to approximate the unknown functions.

Figure 6. Block Diagram

The design of BP Neural Network is to determine the number of layers, the number of neurons in each layer and various parameters. The structure is illustrated in Figure 7.

Figure 7. The BP Neural Network Structure

5. Simulation Results and Discussion

The first step in the proposed work is to acquire the fabric using the digital camera from the textile industry (Maya Garments) and the image is stored in computer as PNG format. The capture image of the defect fabric is shown in Figure 8.

Figure 8. Sample Image of the Defect Fabric

In sample image of the defect fabric, the color of a pixel is made up of Red, Green, and Blue (RGB). It can be explained based on its pixel intensity values. RGB color image requires a large space for storage, so it is converted to gray value. After gray scale conversion, Figure 9 is obtained.

Figure 9. Gray Scale Conversion

The preprocessing is used to remove the noise of an input image. H. Ibrahim et al. (2013) [10] says that Filtering in image processing is a process that cleans up the appearances and allows for selective highlighting of the specific information. The image obtained after the filter is shown in Figure 10.

Figure 10. Image After Filtering

Dr. R. S. Sabeenian et al. (2011) [9] suggested that Histogram equalization (Figure 11) is a method for stretching the contrast by uniformly distributing the gray values enhances the quality of an image. It enhances the contrast of images by transforming the values in an intensity image.

Figure 11. Histogram Equalized Image

With the removal of external noise and disturbances in the image that is given in Figure 12.

Figure 12. Image After Noise Removal

The noise of the image is being totally removed in the noise removal part of the system. The next step after the noise removal from the fabric image is the conversion of the noise removed image to the binary image (Figure 13) of the original image.

Figure 13. Binarised Image

Then the morphological operations are done on the above binarized image to find the structure of the fault. Dilation (Figure 14) is the process of enlarging the boundaries of foreground image.

Figure 14. Dilated Image

Then the output window is show in Figure 15.

Figure 15. Output Window

6. Hardware Implementation

The block diagram of the hardware module is shown in Figure 16.

Figure 16. Block Diagram

6.1 Buzzer

A buzzer or beeper (Figure 17) is a signaling device. The circuit is designed to control the buzzer. The buzzer ON and OFF is controlled by switching the transistor (BC 547). The buzzer is connected in the transistor collector terminal. When high pulse (5 Volt) signal is given to base of the transistor, the Buzzer will ON. When low pulse is given to base of transistor, it will turn OFF.

Figure 17. Block Diagram of a Buzzer

6.2 Arduino Microcontroller

The Arduino Uno is a microcontroller board based on the Atmega328. The Arduino software is easy-to-use for beginners, yet flexible enough for advanced users.

6.3 LCD

LCD (Liquid Crystal Display) screen is an electronic display module, where a 16x2 display is used. A 16x2 LCD display means, it can display 16 characters per line and there are 2 such lines. In this LCD, each character is displayed in a 5x7 pixel matrix.

6.4 Power Supply

The AC voltage, typically 220V, is connected to a transformer, which steps that AC voltage down to the level of the desired DC output. A regulator circuit removes the ripples and also remains the same DC value, even if the input DC voltage varies, or the load connected to the output DC voltage changes.

6.5 LED

LED display is a flat panel display, which uses an array of light emitting diodes as pixels for a video display. LEDs come to full brightness without the need for a warm-up time.

6.6 APR9600 RE-Recording Voice IC

It is a Single-chip, high-quality voice recording & playback solution as shown in Figure 18. The device supports both random and sequential access of multiple messages and its features are listed as follows:

  • No external ICs required.
  • Minimum external components.
  • Non-volatile Flash memory technology.
  • No battery backup required.
  • User-friendly, easy-to-use operation.
  • Low power consumption.
  • Operating current: 25 mA typical.
  • Standby current: 1 uA typical.
 

Figure 18. APR600 Voice IC

7. Arduino Kit Interfacing

The Arduino kit is interfaced with PC as shown in Figure 19.

Figure 19. Output Window

7.1 LCD Working

lcd.set Cursor (column, row).

However there is one thing to consider, that's the number of columns and rows that start from zero.

lcd.setCursor(1,1); lcd.write(48);

where 48 is the decimal equivalent for ACII '0'.

  • LCD can be used in two modes- 4 bit mode or 8 bit mode. In 8 bit mode, we require 8 data pins and 3 control pins, whereas in 4 bit mode, data is sent using 4 data pins and 3 control pins.
  • R/W pin is always grounded so we require only 6 pins in 4 bit mode, thus saving the number of pins.
  • First initialize the library and then define pins using the command Liquid Crystal lcd (RS, E, D4, D5, D6, D7), pins are assigned in this order.
  • Liquid Crystal lcd (12, 11, 5, 4, 3, 2), here RS pin to 12, Enable pin to 11, D4 pin to 5, D5 pin to 4, D6 pin to 3 and D7 pin to 2, respectively.
  • Then in setup function, write the message to display as, lcd.print (“message”).
  • The authors can print the message anywhere within the LCD by selecting column and row, which is done by writing,
  • You can use “lcd.write()” to send characters. To print zero on 2nd colum 2nd row type,

 

7.2 Alarm Working

  • This small sound module can be driven by an Arduino output pin.
  • A pulse of current will make it click. A series of pulses will cause it to output a tone, and you can control the frequency.
  • With the Arduino TONE library, many different sounds can be made. It is not a full-range speaker.
 

The language used to write codes in Arduino programming is C++. The screenshot of the Arduino programming window is given below Figure 20.

Figure 20. Arduino Programming Window

7.3 Steps for Upload File to Arduino

  • Load file -> Blink into IDE.
  • Make sure you select the correct board.
  • Tools -> Board -> Uno.
  • Make sure you select the correct serial port.
  • Click on the upload button.
 

Once we upload the file, we get the buzzer sound, led blinking, voice output of the detected fault and the detect fault will be displayed in the LCD. The screenshot of the output is shown in Figure 21.

Figure 21. Input and Output Window of Oil Spot

Conclusion

In this paper, a new intelligent fabric defect inspection model is presented. The recognizer acquires digital fabric images by an image acquisition device and converts that image into a binary image by morphological operators along with filtering & histogram equalization, which is used for fault detection. The hybridized algorithm proposed in this paper detects 6 different types of faults unlike the existing algorithm. Further the method is extended by using neural network as a classifier for classification of defects based on the output. Thus, this method helps in both detection of faults as well as the classification of various types of faults. This method would serve as a boom for fabric industry for quality production. This is done as a simulation for a still image. Whenever the software detects a fault in the fabric, it sends a signal to the microcontroller and it stops the system for a while to eliminate the defective part of the fabric. The buzzer is switched ON and the detected fault is displayed in the LCD. The speaker will give the voice alert of the detected fault.

References

[1]. Dorrity J., Vachtsevanos G. and Jasper W. (1995). “Real-time fabric defect detection and control in weaving processes”. National Textile, pp.143-152.
[2]. Kumar A. (2008). “Computer vision-based fabric defect detection: A survey”. IEEE, Transactions on Industrial Electronics, Vol.55, No.1, pp.348-363.
[3]. Mahajan P.M., Kolhe S.R. and Pati P.M. (2009). “A review of automatic fabric defect detection techniques”. Advances in Computational Research, ISSN: 0975–3273, Vol.1, No.2, pp.18-29.
[4]. Mitropoulos P., Koulamas C., Stojanovic R., Koubias S., Papadopoulos G., and Karagiannis G. (1999). “A realtime vision system for defect detection and neural classification of web textile fabric”. Electronic Imaging '99 International Conference.
[5]. Malamas E.N., Petrakis E.G.M., Zervakis M., Petit L. and Legat J.D. (2003). “A survey on industrial vision systems, applications and tools”. Image and Vision Computing, Vol.21, pp.171.
[6]. Priyanka Vyas, Manish Kakhani, (2015). “Fabric Fault Processing Using Image Processing Techniques”. International Journal of Multidisciplinary Research and Development, Vol.2, No.2, pp.29-31.
[7]. Jagruti mahure & Y.C. Kulkarni, (2013). “Fabric Faults Processing: Perfections And Imperfections”. International Journal of Computer Science and Technology (IJCST) ISSN : 0976-8491 (Online), ISSN : 2229-4333 (Print), Vol.4, No.2.
[8]. G.M. Nasira, P. Banumathi, (2013). “Plain Woven Fabric Defect Detection Based on Image Processing and Artificial Neural Networks”. International Journal of Computer Trends and Technology (IJCTT), Vol.6, No.4.
[9]. R.S. Sabeenian, M.E. Paramasivam, and P.M. Dinesh, (2011). “Detection And Location Of Defects In Handloom Cottage Silk Fabrics Using MRMRFM & MRCSF”. IJTE, Vol.2, pp.1-21.
[10]. H. Ibrahim, L. Canan, Mehmet. (2013). “Developing An Algorithm For Defect Detection of Denim Fabric: Gabor Filter Method”. Tekstil Ve Konfeksiyon, Vol.23, No.2.
[11]. J. Rajalakshmi and A. Selvarasi, (2015). “A Hybridized Algorithm for Fabric Fault Detection”. International Journal of Research in Engineering,