Professional Documents
Culture Documents
Fabric Defect Detection
Fabric Defect Detection
131027
131075
131085
CONTENTS
Introduction
Objective
Practical Implementation
Literature Review
RGB image
HSV image
Noise removal
Masking
Flow diagram
Code explanation
Results
Conclusion
References
2
INTRODUCTION
Defects in fabrics are generated by the manufacturing machines which are not 100% efficient.
A fabric is a flat structure consisting of fibrous materials, either natural or man- made. Fabric defect could be simply
defined as an abnormality in or on the fabric construction.
There are different types of defects
Holes
Stains
Colour spills
Weaving defects
CONTD.
Presently, in this project we will be working on two defects. They are as follows
HOLES
STAINS
OBJECTIVE
The objective of our project is to detect the presence of various types of defects in plain fabrics which occur during
the manufacturing process. Different techniques in spatial and frequency domains are used to implement an
effective system for detecting defects such as holes and stains.
PRACTICAL IMPLEMENTATION
In the manufacturing process, the image of the fabric is taken by a high quality camera. The fabric sheet is exposed
to proper light such that the light is evenly spread all over the surface. The acquired image is then downloaded in
the system for fault detection. The image passes through a series of blocks which include image enhancement,
image segmentation, etc. to produce a final output which highlights the defect in the rgb image. A control signal is
then sent to the machinery to stop and asks users what action to take. In the current model weve implemented the
detection of two defects namely holes and stains using MATLAB.
LITERATURE REVIEW
NOISE REMOVAL
10
MASKING
Write about masking in image segmentation
11
FLOW DIAGRAM
12
MATLAB CODE
clc;
clear all;
hImage = hsvImage(:,:,1);
close all;
sImage = hsvImage(:,:,2);
vImage = hsvImage(:,:,3);
[filename,pathname]=uigetfile('fabricTest1.jpg','C:\Users\abhi
nav arora\Documents\matlab files\');
v2Image = im2uint8(vImage);
image
scan_img1=imread(fullfile(pathname, filename));
scan_img=imresize(scan_img1,[300 300]);
z=fspecial('average',3);
filtImage=imfilter(v2Image,z);
hsvImage = rgb2hsv(scan_img);
%Display
13
CONTD..
% Setting the Threshold Value For Hue,Saturation and
Value
valueThresholdLow=0;
subplot(1,2,1);
valueThresholdHigh=0.2;
imshow(totalMask);
% Now apply each color band's particular thresholds to
the color band
totalMask= and((vImage >= valueThresholdLow),(vImage <=
valueThresholdHigh));
%Dilate the Output Image to Smoothen the Image%
w5=strel('disk',10);
totalMask_dilated =imdilate(totalMask,w5);
title('Mask');
subplot(1,2,2);
imshow(totalMask_dilated);
title('Dilated Mask');
14
CONTD..
%Applying mask to H, S and V
figure(4);
hue1=totalMask_dilated.*hImage;
imshow(rgbimage_dd);
sat1=totalMask_dilated.*sImage;
value1=totalMask_dilated.*vImage;
%Again Converting the HSV image to RGB image
hsv1(:,:,1)=hue1;
hsv1(:,:,2)=sat1;
hsv1(:,:,3)=value1;
rgbimage_dd = hsv2rgb(hsv1);
15
16
CONTD.
17
TEST IMAGE 2
18
CONTD..
19
TEST IMAGE 3
20
CONTD..
21
TEST IMAGE 4
22
CONTD..
23
CONCLUSION
Using the HSV filtering and thresholding methods the the defect in the fabric was clearly detected. However, the
efficiency of this method was 85% because defects of very small size were undetectable. This method proves to be
successful for images which have dark color defects as in holes and stains. But the weaving and yarn defects still
remain undetected.
For our next term, wed be using spectral approaches such as Gabor filter etc to detect colour spills, weaving
and yarn defects and improve the efficiency of current system.
24
REFERENCES
Sheetal Thorave Prof. M.S.Biradar | Fabric Defect Detection Based on Fuzzy C-Mean Algorithms |
( International Journal on Recent and Innovation Trends in Computing and Communication ISSN: 2321-8169
Volume: 2 Issue: 2 367 371) IJRITCC | February 2014.
S.S. Bedi1, Rati Khandelwal |Various Image Enhancement Techniques- A Critical Review(International
Journal of Advanced Research in Computer and Communication Engineering Vol. 2, Issue 3) | March 2013.
Abdel Salam Malek | Online fabric inspection by Image Processing Technology | University of Haute
Alsace | 2012.
25