You are on page 1of 7

European Journal of Scientific Research ISSN 1450-216X Vol.67 No.4 (2012), pp. 595-601 EuroJournals Publishing, Inc.

. 2012 http://www.europeanjournalofscientificresearch.com

Automated Fabric Defect Recognition System using Image Processing and Artificial Neural Networks with the Support of Microcontroller
R. Thilepa Department of EEE, Adhiyamaan Engineering College Hosur, Tamilnadu-635 109 E-mail: thilepasudhakar@yahoo.co.in K. Sathiyasekar Principal, CMS College of Engineering, Namakkal District Tamilnadu- 637 003 E-mail: drkscms@gmail.com Abstract In Developing countries like India mostly 30% of income is achieved by textile export requires less defective textile for minimizing production cost and time. Inspection processes done on these industries are mostly done manually and time consuming. To reduce error on fabric defects identifying requires more automotive and accurate inspection process. Dockery.A (2005). Considering this lackage this research implements a fabric defect recognizer which uses image processing technique along with artificial neural network and Microcontroller to identify the defects on the fabrics. The recognizer suitable for developing countries identifies the fabric defects within economical cost and produces less error prone inspection system in real time. To generate input for neural network, primarily the fabric images are captured and the images are converted into binary images by restoration process and threshold techniques. Then the output of the processed image and the number of objects of the image are fed back as an input layer to the neural network. Later it is interfaced with the Microcontroller along with the stepper motor. Keywords: Image processing, Artificial neural networks, Atmel Microcontroller, Stepper motor.

1. Introduction
All fabric Industries try to give competitive fabrics without defects. This competition depends mainly on productivity and the quality of fabrics. In developing countries like India mostly defects arising on the fabrics are still detected manually which consumes more time. They have to detect small details that can be located in a wide area that is moving through their visual field. The manual identification rate is nearly 70%.Digital image processing techniques has been used in fabric industries over the decades. Meier.R (2005). In fabric field there are different types of faults such as scratch, hole, dirty spots, color bleeding etc;if these faults are not detected properly it will affect the production system massively. Kang T.J. et al.

Automated Fabric Defect Recognition System using Image Processing and Artificial Neural Networks with the Support of Microcontroller

596

The proposed system is used to detect the faults such as hole, scratch, dirt spot and if there is no fault on the fabric. The objective of the paper is to develop an automated fabric defect recognizer based on Image processing and artificial neural networks along with the Microcontroller and stepper motor.

2. Methodology of Paper
Fabric sample taken from Industries Fabric sample image is given as input to system by Matlab Programming Filtered output is processed by Histogram and Thresholding Binary Image Processing is done and given to feed forward and Back propagation networks Simulated output of Neural Network is given to Microcontroller Microcontroller Interfaced with stepper motor rotates if there is no fault on the fabric and stops rotation if the fault is identified.

3. Processing the Fabric Image by Image Processing


In our system the original digital image (RGB) is converted into gray scale image by noise filtering techniques. Gonzalez.R.C.et.al (2005). Spatial filtering algorithm is used for noise filtering process in image Mag.K.L.et.al (2006). After this process the histogram process is done to calculate the threshold value as shown below.
Figure 1: Conversion of RGB into Gray Scale Image

597
Figure 2: Histogram output of the Image

R. Thilepa and K. Sathiyasekar

The decision tree process indicate that the threshold value is greater than 100 and lesser than 150.This output image value along with the threshold is now given as input to the neural networks.

4. Neural Network Implementation


The Neural Network constructed consists of trained networks with 44 hidden neurons and one output layer of 4 neurons. In this first neuron is designated with Hole, second neuron is designated with fade, third with scratch and the fourth neuron for no fault. It is trained to achieve the target output [{1 0 0 0}, {0 0 1 0}, {0 1 0 0}, {0 0 0 1}] for consecutive faults, MATLAB (2004). The final output is determined using winner take all method.
Figure 3: Neural Network Program in Matlab

The above figure shows the neural network program which is used for interfacing with the Microcontroller. Based on the fault the output is obtained.

Automated Fabric Defect Recognition System using Image Processing and Artificial Neural Networks with the Support of Microcontroller

598

5. Microcontroller Implementation
Figure 4: Complete Circuit diagram

The above circuit is designed with the Atmel Microcontroller which is used for interfacing. This controller is attached with the stepper motor of 12V capacity. This motor will rotate if there is no fault on the fabric image and stops the rotation if fault such as hole, scratch and fade are identified.
Figure 5: Pin Diagram of ATMEL Microcontroller

The above figure shows the pin diagram of ATMEL controller.ATmega16 provides the following features: 16K bytes of In-System Programmable Flash Program memory with Read-WhileWrite capabilities, 512 bytes EEPROM, 1Kbyte SRAM, 32 general purpose I/O lines,32 general purpose working registers, a JTAG interface for Boundary-scan, On-chip Debugging support and programming, three flexible Timer/Counters with compare modes, Internal and External Interrupts, a serial programmable USART, a byte oriented Two-wire Serial Interface, an 8-channel, 10-bit ADC with optional differential input stage with programmable gain (TQFP package only),a programmable Watchdog Timer with Internal Oscillator, an SPI serial port, and six software selectable power saving modes. Thilepa.R.et.al (2010). The Idle mode stops the CPU while allowing the USART, Two-wire interface, A/D Converter, SRAM; Timer/Counters, SPI port, and interrupt system to continue functioning. The Power-down mode saves the register contents but freezes the Oscillator, disabling all other chip functions until the next External Interrupt or Hardware Reset. In Power-save mode, the Asynchronous Timer continues to

599

R. Thilepa and K. Sathiyasekar

run, allowing the user to maintain a timer base while the rest of the device is sleeping. The ADC Noise Reduction mode stops the CPU and all I/O modules except Asynchronous Timer and ADC, to minimize switching noise during ADC conversions. In Standby mode, the crystal/resonator Oscillator is running while the rest of the device is sleeping. This allows very fast start-up combined with low-power consumption. In Extended Standby mode, both the main Oscillator and the Asynchronous Timer continue to run. The device is manufactured using Atmels high density nonvolatile memory technology. The On-chip ISP Flash allows the program memory to be reprogrammed in-system through an SPI serial interface, by a conventional nonvolatile memory programmer, or by an On-chip Boot program running on the AVR core. The boot program can use any interface to download the application program in the Application Flash memory. Software in the Boot Flash section will continue to run while the Application Flash section is updated, providing true Read-While-Write operation. By combining an 8-bit RISC CPU with In-System Self-Programmable Flash on a monolithic chip, the Atmel ATmega16 is a powerful microcontroller that provides a highly-flexible and costeffective solution to many embedded control applications. The ATmega16 AVR is supported with a full suite of program and system development tools including: C compilers, macro assemblers, program debugger/simulators, in-circuit emulators, and evaluation kits.
Figure 6: Motor at the Initial Stage

This is the initial stage of the circuit before feeding input image with the stepper motor.
Figure 7: Fabric Image Input to the System

By giving this image as input to the system which is interfaced with the Microcontroller the stepper motor rotates. The microcontroller is programmed and is connected to the serial port of the computer. Since there is no fault on the system the motor will rotate continuously and will stop the rotation if any fault is identified. Below figure shows the motor rotation with the fabric image if there

Automated Fabric Defect Recognition System using Image Processing and Artificial Neural Networks with the Support of Microcontroller

600

is no defect on the image. The complete circuit is designed with the IC LM317 to get 5V output.Max 232 IC is used to interface with the computer.40 pin IC Microcontroller is used with pin number 14,15 are connected with MAX 232.Pin numbers 3 to 8 are connected with the LCD display to indicate the status of motor. Pin numbers 22 to 25 are connected to IC L293D to drive the stepper motor depending on the fabric image input. The diodes used in the power supply are 47, 220 and 1k respectively acts as potential dividers. The transformer is step down transformer with 230/12 V.The diodes 1N 4007 used as rectifiers.
Figure 8: Motor Rotation with Input Fabric Image

If the defect is identified on the fabric image the motor rotation stops. The Microcontroller is interfaced with the system by the RS232 serial interface port. The crystal oscillators used is 8 mega hertz capacity, LCD used is 15 X 2 Alphanumeric LCD and LED is 5mm.

6. Result
The detection of fault in the system is done basically done by thresholding through the neural network with Matlab.The overall accuracy is obtained is thus 76%.
Figure 9: Bar chart for the Performance of the System

601

R. Thilepa and K. Sathiyasekar

7. Conclusion
In most of the textile industries of Tirupur the defects are detected manually. The main textile quality control usually goes over the human eye inspection. The accuracy of human visual inspection declines with dull jobs and endless routines. Chi-Ho-Chan.et.al (1998). Notoriously human visual inspection is tedious, tiring and fatiguing task, involving observation, attention and experience to detect exactly the fault occurrence. Stojanovic.R.et.al (2001). Sometimes slow expensive and erratic inspection is the result. Therefore the automatic visual inspection protects both the human and the quality of fabrics. Chuanjun Wang.et.al (1994). Here it is described that the automated textile defect detection system operates with more accuracy and efficiency.

References
[1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] Ahmed Ridwanul Islam, Farjana Zebin Eishita, Jesmine Ara Bubly, Implementation of a Real Time Automated Fabric Defect Detection System 2007. Chi-Ho-Chan, Hugh Liu, Thomas Kwan, Grantham Pang Automation Technology for Fabric Inspection System CGIM 1998, Canada. Chuanjun Wang and Chih-Ho-Yu Machine Vision Based inspection of Textile fabrics Proceedings of IAPR Workshop on Machine Vision Applications December 13-15, 1994, Kawasaki. Dockery.A., Automatic Fabric Inspection: Assessing the Current State of the Art, [Online document], 2001, [cited 29 Apr. 2005]. Goankar. R.S., Microprocessor Architecture, Programming and Applications with the 8085 5th Edition, Prentice hall, 2002. Gonzalez.R. C., Woods.R. E., S. L. Eddins, Digital Image Processing using MATLAB, ISBN 81-297-0515-X, 2005, pp. 76-104,142-166,404-407. Kang T.J. et al. Automatic Structure Analysis and Objective Evaluation of Woven Fabric Using Image Analysis, Textile Res. J. 71(3), 261-270. Mag.K.L. and Peng.P. Detecting Defects in Textile Fabrics with optimal Gabor Filters World Academy of Science Engineering and Technology, 13, 2006. Meier.R, Uster Fabriscan, The Intelligent Fabric Inspection, [Online document], cited 20Apr. 2005], Available HTTP:http://www.kotonline.com/english_pages/ana_basliklar/uster.asp. Neural Network Toolbox, MATLAB The Language of Technical Computing, [CD Document], Version 7.0.0.19920(R14), 2004. Stojanovic.R., Mitropulos.P, Koulamas.C, Karayiannis.Y. A, Koubias.S, and Papadopoulos.G., Real-time Vision based System for Textile Fabric Inspection, Real-Time Imaging, vol. 7, no. 6, 2001, pp. 507518. Thilepa.R and Thanikachalam.M Fabric Fault Detection Using Image Processing with Atmel Microcontroller International Journal of Engineering Science and Technology Vol. 2 (11), 2010 6540-6549.

You might also like