A Paper on Automatic Fabrics Fault Processing Using Image Processing Technique in MATLAB

The main objective of this paper is to elaborate how defective fabric parts can be processed using Matlab with image processing techniques. In developing countries like India especially in Tamilnadu, Tirupur the Knitwear capital of the country in three decades yields a major income for the country. The city also employs either directly or indirectly more than 3 lakhs of people and earns almost an income of 12, 000 crores per annum for the country in past three decades [2]. To upgrade this process the fabrics when processed in textiles the fault present on the fabrics can be identified using Matlab with Image processing techniques. This image processing technique is done using Matlab 7.3 and for the taken image, Noise Filtering, Histogram and Thresholding techniques are applied for the image and the output is obtained in this paper. This research thus implements a textile defect detector with system vision methodology in image processing.


INTRODUCTION
The city Tirupur in Tamilnadu consists of at present 3000 sewing units, 450 knitting units and 100s of dyeing units at present for fabrics processing. These units involve both manual and automation for all processes. The annual income for the past year 2008 stands at Rs.8000 crore.This city is also named as Manchester of South India [12]. Since the city yields a major income on textiles and fabrics, it is given more importance to this field here.In this paper a fabric faulty part is taken for analysis from textiles. For this process we have used Matlab 7.3 in image processing software. Here we can analyze all faults present on fabrics such as hole, scratch, dirt spot, fly, crack point, color bleeding etc… automatically. Several authors have considered defect detection on textile materials.Kang et al. [16], [17] analyzed fabric samples from the images obtained from transmission and reflection of light to determine its interlacing pattern. In addition if the faults are to be identified manually the time consumption is more comparatively less and the percentage of fault identification is deduced to a lower rate. Also it has been observed that the price of textile fabric is reduced by 45% to 65% due to defects [13] . Machine vision automated inspection system for textile defects has been in the research industry for longtime [14], [15]. Recognition of patterns independent of position, size, brightness and orientation in the visual field has been the goal of much recent work. Hence the efficiency is also reduced in this process. To overcome all these drawbacks this automation process can be implemented. An image may be defined as a two -dimensional function, f(x, y), where x and y are spatial (plane) coordinates, and the amplitude of f at any pair coordinates (x, y) is called the intensity or gray level of the image at that point. [1].When x, y, and the amplitude values of f are all finite, discrete quantities; we call the image as a digital image. The Image Processing technique is a collection of functions that extend the capability of the MATLAB in numeric computing environment.

Indian textile and clothing exports to US is lowest in
The toolbox supports a wide range of image processing operations, including: open image file, add noise of a given type (e.g. salt &pepper, Gaussian, Speckles...) to intensity image, 2-D median filtering and adaptive filtering, Image analysis and enhancement, Color Image decomposition into RGB Channels, Image histogram, Image segmentation, image Multithresholding,, image movie , signal plotting and etc... , Many of the toolbox functions are MATLAB M-files, Model files and a series of MATLAB statements that implement specialized image processing algorithms. Then Histogram is done for the image and finally thresholding is done for the same image using this image processing toolbox. • Make a new directory in which you Work for this course [3]. We can get help on any Matlab function by typing help <function> or to get help Specifically on the Image Processing Toolbox type help images, typing just help will show you all the available help topics.
Convert from [0,255] to [0,1] im_grey = im_grey/255; to view an image use either imshow(im) or imagesc(im), note the difference [4]. We can use imagesc and then set the axis for an image with axis image; Axis labelling can be turned on and off by axis on; axis off; The defective fabric part is now processed using Matlab by the following steps. In the first step it is converted into gray image as shown in the above figure then noise removal is done. This data is used to obtain the Histogram output after thresholding is done. This is the procedure followed for fault fabric processing using Matlab in this paper. The below program is executed in Matlab 2008 and the defective fabric image is obtained. Similarly the Histogram image is obtained from the image. The below is the Matlab program which is used for fabric fault analyzing and for obtaining histogram output.  . The image formats are .Gif, .tif, .Jpeg, and .bmp. In this paper we used color images (RGB images) and separated into their components (Red, Green, and Blue).

Fig 4: Fabric color Image is converted into Gray scale Image
Explore noise reduction in images using linear and nonlinear filtering techniques is applied.WIENER2 Performs 2-D adaptive noise-removal filtering [6].WIENER2 low pass filters an intensity image that has been degraded by constant power additive noise. WIENER2 (Adaptive filtering) uses a pixel-wise adaptive Wiener method based on statistics estimated from a local neighborhood of each pixel.

THRESHOLDING:
In thresholding, the color-image or gray-scale image is reduced to a binary image.Thresholding is a process of converting a grayscale input image to a bi-level image by using an optimal threshold [7]. The purpose of thresholding is to extract those pixels from some image which represent an object (either text or other line image data such as graphs, maps). Though the information is binary the pixels represent a range of intensities. For a thresholding algorithm to be really effective, it should preserve logical and semantic content. There are two types of thresholding algorithms: (i) Global thresholding algorithms (ii) Local or adaptive thresholding algorithms In global thresholding, a single threshold for all the image pixels is used. When the pixel values of the components and that of background are fairly consistent in their respective values over the entire image, global thresholding could be used. In adaptive thresholding, different threshold values for different local areas are used. In our paper adaptive thresholding is used. To perform histogram graph for an image, pixels of each color in the image, and producing a running sum of the count. Then by simply scaling the output, we can perform histogram process.The histogram's x-axis reflects the range of values in Y. The histogram's y-axis shows the number of elements that fall within the groups; therefore, the y-axis ranges from 0 to the greatest number of elements deposited in any bin. The x-range of the leftmost and rightmost bins extends to include the entire data range in the case when the user-specified range does not cover the data range. Histograms bins are created as patch objects and always plotted with a face color that maps to the first color in the current color map (by default, blue) and with black edges } img = imread (imageName); imGray = rgb2gray(img); myHist = imhist(imGray); eqImage = imhisteq(imGray); figure, imshow(imGray); figure, imshow(eqImage);

HISTOGRAM OUTPUT OF THE FAULTY FABRIC:
• The first line reads the image file into a 3 dimensional array (x, y, color). about the details (like the width being a multiple of four).
• The second line converts an RGB image into a gray image. This is not necessary if the image is already a gray level image.
• The third line returns the image histogram in the array myHist. This can be used to analyze the image histogram and possibly perform histogram specification.
• The fourth line performs histogram equalization.
• The final two lines display the un-equalized image and the equalized image.
• In order to view the histogram of the image, we will supply two output arguments to the function for histogram equalization. The output arguments are the transformation function and the equalized image respectively. This is given as follows : [eqImage, transfFunc] = imhisteq(imGray); figure, plot(transfFunc); figure, imshow(eqImage); The second and third lines display the transformation function and the histogram equalized image respectively[10].

CONCLUSION:
It is easy to identify faults on fabric images and process by using this method. Thus the MATLAB Implementation is done for fault identification such as hole, scratch, fading and other faults on fabrics can be identified and processed. Thus the overall efficiency is 85% by using this process compared to other methods of fault identification. Hence a different approach wherein various thresholding algorithms can be successively applied on the input image can yield better results. The manual textile quality control usually goes over the human eye inspection. Notoriously, human visual inspection is tedious, tiring and fatiguing task, involving observation, attention and experience to detect correctly the fault occurrence. The accuracy of human visual inspection declines with dull jobs and endless routines. Sometimes slow, expensive and erratic inspection is the result. Therefore, the automatic visual inspection protects both: the man and the quality. Here, it has been demonstrated that Textile Defect Recognition System is capable of detecting fabrics' defects with more accuracy and efficiency Thereby applying Matlab 7.3 version to the color faulty fabrics it is processed and finally the Histogram is obtained for the same image and thresholding is done to obtain the intensity of the image [8]. In future this can be extended to any number of fault identifications on fabrics and can be processed.

FUTURE SCOPE OF THE WORK:
In future this work may be extended such that the output is given to neural network and the Microcontrollers of any type can be utilized and programmed such that it can detect the faulty fabric part. If the microcontroller is connected with motors of any type then it will be operated under normal fabric condition and can stop the motor if there is any fault on fabrics.