You are on page 1of 45

Student Project Report on

EXPLORING IMAGE ENHANCEMENT AND OPTIMIZATION TECHNIQUES


FOR FABRIC DEFECT IDENTIFICATION IN HOSIERY INDUSTRY
Submitted to

TAMILNADU STATE COUNCIL FOR SCIENCE AND TECHNOLOGY


DOTE campus, Chennai-600025

by
Ms. R.Girija

Department of Computer Science


Chikkanna Government Arts College
Affiliated to Bharathiar University
Accredited with B+ grade by NAAC,

Tirupur 641602. Phone: 0421 2242152; Fax: 0421 2246600


Website: www.cgac.in.

2014-2015

1. INTRODUCTION
The main goal of this project is identifying fault detection in fabrics. The textile industry,
as with any industry today, is very concerned with quality. It is desirable to produce the highest
quality goods in the shortest amount of time possible. Fabric faults or defects are responsible for
nearly 85% of the defects found by the Manufacturers recover only 45 to 65 % of their profits
from seconds or off-quality goods. It is imperative, therefore, to detect, to identify, and to
prevent these defects from reoccurring. Here it can analyze all faults present on fabrics such as
hole, scratch, dirt spot, fly, crack point, color bleeding etc. automatically. Proposed textile
analysis mainly detects on holes, scratch fault. There are few techniques used to detect defects.
First is Image enhancement. It means improving the visual appearance of an image and
providing better input for other automated image processing techniques. The principal
objective of image enhancement is to modify attributes of an image to make it more suitable for
a given task and a specific observer. There exist many techniques that can enhance a digital
image without spoiling it. For example, we can remove noise, sharpen, or brighten an image.
The enhancement methods can broadly be divided into the following two categories:
3. Spatial Domain Methods
4. Frequency Domain Methods
In spatial domain techniques, we directly deal with the pixels, the pixel values are
manipulated to achieve desired enhancement.
In frequency domain methods, the image is first transferred into frequency domain. A
dramatic increase in research activities on image processing and industrial applications based on
them has created a great demand for research work in this area. This project is automated defect
identification in fabric based on image processing techniques in hosiery industry, like image
enhancement, resizing, normalization, noise removal.
To serve the hosiery industry to reduce manpower requirements and produce high quality
product with minimum cost and time by automated defect detection using the MATLAB
R2012a.

1.1. SYSTEM SPECIFICATION


1.1.1. HARDWARE SPECIFICATION
Processor

: Intel Dual Core or higher

RAM

: 1024 MB

Hard Disk Drives

: 40 GB

Monitor

: 15 Color Monitor

Keyboard

: Multimedia Keyboard

Mouse

: Logitech Mouse

NIC

: Realtek / Intel 10/100 Mbps

Camera

: Canon with 16 mega pixel

1.1.2. SOFTWARE SPECIFICATION


Operating System

: Windows 7

Technology

: Image processing

Tool

: MATLAB R2012a

Processor

: Intel Dual Core or higher

RAM

: 1024 MB

Hard Disk Drives

: 40 GB

Monitor

: 15 Color Monitor

Keyboard

: Multimedia Keyboard

Mouse

: Logitech Mouse

NIC

: Realtek / Intel 10/100 Mbps

2. SYSTEM STUDY
The main objectives of this system study are,
To explore image enhancement and optimization techniques for fabric defect
identification in hosiery industry.
To obtain noise removed, enhanced, filtered and normalized image.
To serve the hosiery industry to reduce manpower requirements and produce high quality
product with minimum cost and time by automated defect identification.

2.1. LITERATURE STUDY


1. Hasanul Kabir, Abdullah Al-Wadud, and Oksam Chae (The International Arab Journal
of Information Technology, Vol. 7, No. 4, October 2010) was done a work on Transformation
functions utilizing the global information content of an input image have been long serving
contrast enhancement by stretching the dynamic range of intensity levels. Other transformation
functions focus on local information content to correct image details, such as edges and texture.
In this paper, an effective method for image contrast enhancement is presented with a mapping
function, which is a mixture of global and local transformation functions that improve both the
brightness and fine details of the input image. The final mapping function incorporates a local
intensity-pair distribution generated expansion function from each image block to control the
enhancement of image details that the global transformation function alone may fail to improve.
Contribution from the global transformation function preserves the overall image brightness and
contrast stretching.
2. S.Anitha , V.Radha, (ISSN : 0975-4024 Vol 6 No 2 Apr-May 2014) was done a work
on Quality control is one of the basic issues in textile industry. Analysis of texture content in
digital images plays an important role in the automated visual inspection of fabric images to
detect the defects. The preprocessing stage is an essential initial step in the patterned fabric
defect detection system in retaining the important information and the major problem in
processing patterned fabric images is the presence of impulse noise which appears as bright dots
or dust particles over the image. This paper proposes an enhanced switching median filter to
identify the noisy pixel from the noise free pixel and the noise is removed based on threshold
estimation using genetic algorithm. The performance of the proposed method is evaluated using

the metrics such as peak signal to noise ratio, edge preservation capacity and structure
preservation capacity and time complexity.
3. Sheetal Thorave Prof. M.S.Biradar ( International Journal on Recent and Innovation
Trends in Computing and Communication ISSN: 2321-8169 Volume: 2 Issue: 2 367 371)
There exist various computer based techniques researched available in fabric defect detection
but in accuracy and various problem exists in this techniques. So in this paper we introduced, the
new techniques for fabric defect detection using automatic visual analysis. In this paper the
fabric defect is detected by using clustering algorithm. Clustering methods is also used for image
segmentation. The main objective of this paper is to show the outcome of fuzzy c-mean
technique in the fabric defect recognition. Also performance of fuzzy C-mean is spotlighted.
4. S.S. Bedi1 , Rati Khandelwal2 Assistant Professor, CSIT, MJPRU, Bareilly,
(International Journal of Advanced Research in Computer and Communication Engineering Vol.
2, Issue 3, March 2013) was done a work on Image Enhancement is one of the most important
and difficult techniques in image research. The aim of image enhancement is to improve the
visual appearance of an image, or to provide a better transform representation for future
automated image processing. Many images like medical images, satellite images, aerial images
and even real life photographs suffer from poor contrast and noise. It is necessary to enhance the
contrast and remove the noise to increase image quality. One of the most important stages in
medical images detection and analysis is Image Enhancement techniques which improves the
quality (clarity) of images for human viewing, removing blurring and noise, increasing contrast,
and revealing details are examples of enhancement operations. The enhancement technique
differs from one field to another according to its objective. The existing techniques of image
enhancement can be classified into two categories: Spatial Domain and Frequency domain
enhancement. In this paper, we present an overview of image enhancement processing
techniques in spatial domain. More specifically, we categorize processing methods based
representative techniques of Image enhancement. Thus the contribution of this paper is to
classify and review image enhancement processing techniques, attempt an evaluation of
shortcomings and general needs in this field of active research and in last we will point out
promising directions on research for image enhancement for future research.

5. Manpreet Kaur, Jasdeep Kaur, Jappreet Kaur ((IJACSA) International Journal of


Advanced Computer Science and Applications, Vol. 2, No. 7, 2011) This Contrast enhancement
is frequently referred to as one of the most important issues in image processing. Histogram
equalization (HE) is one of the common methods used for improving contrast in digital images.
Histogram equalization (HE) has proved to be a simple and effective image contrast
enhancement technique. However, the conventional histogram equalization methods usually
result in excessive contrast enhancement, which causes the unnatural look and visual artifacts of
the processed image. This paper presents a review of new forms of histogram for image contrast
enhancement. The major difference among the methods in this family is the criteria used to
divide the input histogram. Brightness preserving Bi Histogram Equalization (BBHE) and
Quantized Bi-Histogram Equalization (QBHE) use the average intensity value as their separating
point. Dual Sub-Image Histogram Equalization (DSIHE) uses the median intensity value as the
separating point. Minimum Mean Brightness Error Bi-HE (MMBEBHE) uses the separating
point that produces the smallest Absolute Mean Brightness Error (AMBE). Recursive MeanSeparate Histogram Equalization (RMSHE) is another improvement of BBHE. The Brightness
preserving dynamic histogram equalization (BPDHE) method is actually an extension to both
MPHEBP and DHE. Weighting mean-separated sub-histogram equalization (WMSHE) method
is to perform the effective contrast enhancement of the digital image.
6. Mr. Rohit Verma Dr. Jahid (Volume 3, Issue 10, October 2013)was done a work on
Getting an efficient method of removing noise from the images, before processing them for
further analysis is a great challenge for the researchers. Noise can degrade the image at the time
of capturing or transmission of the image. Before applying image processing tools to an image,
noise removal from the images is done at highest priority. Ample algorithms are available, but
they have their own assumptions, merits and demerits. The kind of the noise removal algorithms
to remove the noise depends on the type of noise present in the image. Best results are obtained
if testing image model follows the assumptions and fail otherwise. In this paper, light is thrown
on some important type of noise and a comparative analysis of noise removal techniques is done.
This paper presents the results of applying different noise types to an image model and
investigates the results of applying various noise reduction techniques.

7. Wanhyun Cho, Seongchae Seo, Jinho You, Soonja Kang (Journal of Computer and
Communications, 2014, 2, 52-56 Published Online January 2014) This paper presents a
preprocessing technique that can provide the improved quality of image robust to illumi-nation
changes. First, in order to enhance the image contrast, we proposed new adaptive histogram
transforma-tion combining histogram equalization and histogram specification. Here, by
examining the characteristic of histogram distribution shape, we determine the appropriate target
distribution. Next, applying the histogram equalization with an image histogram, we have
obtained the uniform distribution of pixel values, and then we have again carried out the
histogram transformation using an inverse of target distribution function. Finally we have
conducted various experiments that can enhance the quality of image by applying our method
with various standard images. The experimental results show that the proposed method can
achieve moderately good image enhancement results.
8. Wanhyun Cho, Seongchae Seo, Jinho You, Soonja Kang(Indian Journal of Fibre and
Textile Research Vol. 39, September 2014) An algorithm with linear filter and morphological
operations has been proposed for automatic fabric defect detection. The algorithm is applied offline to denim fabric samples for five types of defects. All defect type have been detected
successfully and the defective regions are labeled.

The defective fabric samples are then

classified by using feed forward neural network method. Both defect detection and classification
application performances are evaluate statistically. Defect detection performance of real time and
off-line applications are obtained as 88% and 83% respectively. The defective images are
classified with an average accuracy rate of 96.3%.
9. S. Anitha , V. Radha ((IJCSIT) International Journal of Computer Science and
Information Technologies, Vol.2(2),2011,836-839) In automatic fabric inspection, fabric image
acquires impulse noise due to malfunctioning in camera sensors, faulty memory locations in
hardware, or transmission via a noisy channel

Eliminating such noise is an important

preprocessing task. The fabric image should be enhanced to achieve a high interpretability of
perception to defect defects. In this paper contrast stretching, grey level thresholding and median
filters are used to enhance the fabric image. The performances of these methods are evaluated
using Peak Signal to Noise Ratio(PSNR) and Mean Square Error (MSE). The contrast stretching
with spatial median filter gives suitable results to enhance the perception of defects.
7

10. Dr. G.M .Nasira, P. Banumath (International Journal of Computer Trends and
Technology (IJCTT) volume 6 number 4Dec 2013 ISSN: 2231-2803) Textile industry is one
of the revenues generating industry to Tamil Nadu. The detection of defect in fabric is a major
threat to textile industry. Woven fabrics are produced by weaving. Weaving is a process of
interlacing two distinct yarns namely warps and weft. A fabric fault is any abnormality in the
fabric that hinders its acceptability by the user. The price of the fabric is affected by the defects
in fabric. At present, the fault detection is done manually after production of a sufficient amount
of fabric. The nature of work is very dull and repetitive. There is a possibility of human errors
with high inspection time in manual inspection, hence it is uneconomical. This paper proposed a
computer based inspection system for identification of defects in the woven fabrics using image
processing and Artificial Neural Network (ANN) with benefits of low cost and high detection
rate. The inspection system first acquires high quality vibration free images of the fabric. Then
the acquired images are first preprocessed and normalized using image processing techniques
then the preprocessed image is converted into binary images. From the binary image first order
statistical features are extracted and these extracted features are given to the input to the
Artificial Neural Network (ANN) which uses back propagation algorithm to calculate the
weighted factors and generates the output. The ANN is trained by using 115 defect free and
defected images. They achieved the success rate of fabric defect identification in 94.6%.
2.2. EXISTING SYSTEM
Image enhancement techniques like Gabor wavelet filter, Gaussian filter, Min max filter
etc are existing techniques for identifying defects in fabrics. Systems for computer image
analysis for melanoma diagnosis that

use segmentation-based shape features have been

developed Grayscale threshold , color clustering , edge-finding and non-linear diffusion. In the
existing system detecting fabrics defect using HSV is not implemented and also the existing
noise removal algorithm have many drawbacks.
2.2.1. DRAWBACKS
The existing image enhancement techniques are more time consuming and not producing
high accuracy. To avoid the drawbacks of the existing system we proposed an improved mean
filter algorithm for noise removal.

2.3. PROPOSED SYSTEM


In this proposed project, four types of defects are considered for evaluation. There are
many types of defects are available i.e. hole, scratch, stretch, fly yarn, dirty spot, knot, cracked
point, misprints, color bleeding etc; if these defects are not detected properly can affect the
production process massively. Proposed textile analysis mainly detects four types of faults: hole,
scratch, fresh as no fault and remaining faults as other fault. Inspection of 100% of fabric is
necessary to determine the quality as first and second to detect any disturbance in the weaving
process to prevent defects from reoccurring.

2.3.1. SALIENT FEATURES


The main advantage of this project is implemented the image processing technique using
MATLAB and for the taken image, Histogram, Thresholding and Noise Filtering techniques are
applied for the image and the output is obtained in this project. This research thus implements a
textile defect detector with system vision methodology in image processing.

3. SYSTEM DESIGN AND DEVELOPMENT


3.1. LOGICAL DESIGN
The purpose of the logical design is to create a technical solution that satisfies the
functional requirements for the system. It started off with initials of the existing system. The
analysis was helpful giving a thorough understanding of the present system. The analysis of
existing system also uncovered many flaws and limitation of the flaws formed the major
objective of the proposed system goals.
A thorough knowledge about the current system is understood clearly before the system
design was initiated. The files are designed and flow of data is decided and the programs
specification is produced. The system design includes following design process.

Input Design

Output Design

3.2. INPUT DESIGN


Input design is the process of connecting the user-originated inputs into a computer used
formats, the goal of the input design is to make data entry Logical and free from errors. Errors in
the input database controlled by input design. This project is being developed in a user-friendly
manner.
This project, Exploring Image Enhancement and Optimization Techniques for
Fabric Defect Identification in Hosiery Industry has its input screens designed according to
the above specifications. Several stages of input designs are:

Open Image File Location

Insert Image

Converting Images to binary

Image Correction

Image Validations

All the screens are designed in MatlabR2012a and have appropriate controls to save all
the required information regarding the project.

10

3.3. OUTPUT DESIGN


The output form of the system is either by screen or by hard copies. Output design aims
at communicating the results of the processing to the users. The reports are generated to suit the
needs of the users .Outputs from the system are required primarily to communicate the result of
processing to users. Outputs also provide a permanent copy of the result for later consultation.
An intelligible output design will improve system relationships with the user and help in the
decision-making process. This project, Exploring Image Enhancement and Optimization
Techniques for Fabric Defect Identification in Hosiery Industry, have its report designed in
MatlabR2012a, which are given below.

View Fabric Image

View Fabric Image Conversion Mode

View RGB Image Mode

Detect Fault in Fabric

Image Verification

3.4. SYSTEM DEVELOPMENT


The importance of new system is that it is user friendly and a better interface with users
working on it. It can overcome the problems of manual system and the security problem.
Development is the incremental approach to the construction of program structure. Modules are
integrated by moving through the control hierarchy, beginning with the main control module.
Modules subordinate to the main control modules are incorporate into the structure in either a
depth first or breadth first manner.
3.4.1. MATLAB
MATLAB is a high-performance tool for technical computing. It integrates computation,
visualization, and programming in an easy-to-use environment that the problems and solutions
are expressed in familiar mathematical notation. The typical uses are:
1. Math and computation
2. Algorithm development

11

3. Data acquisition
4. Modeling, simulation, and prototyping
5. Data analysis, exploration, and visualization
6. Scientific and engineering graphics
7. Application development, including graphical user interface building

It is an interactive system that the basic data element is an array that does not require
dimensioning. This allows solving many technical computing problems, especially with matrix
and vector formulations, in a fraction of the time it would take to write a program in a scalar non
interactive language such as C or FORTRAN.
The name MATLAB stands for matrix laboratory. It was originally written to provide
easy access to matrix software developed by the LINPACK and EISPACK projects. Today, it
engines incorporate the LAPACK and BLAS libraries, embedding the state of the art in software
for matrix computation. It has evolved over a period of years with input from many users. In
university environments, it is the standard instructional tool for introductory and advanced
courses in mathematics, engineering, and science. In industry, it is the tool of choice for highproductivity research, development, and analysis.
The features a family of add-on application-specific solutions called toolboxes. Very
important to most users of the tool, toolboxes allow learning and applying specialized
technology.

Toolboxes are comprehensive collections of the tool functions that extend its

environment to solve particular classes of problems.

Areas with toolboxes are available

including signal processing, control systems, neural networks, fuzzy logic, wavelets, simulation,
and many others.

The system consists of five main parts, development environment,

Mathematical Function Library, Language, Graphics, and the Application Program Interface
(API).
Development Environment is the set of tools and facilities that helps to use functions and
files. Many of these tools are graphical user interfaces. It includes the tool desktop and
Command Window, a command history, an editor and debugger, and browsers for viewing help,
the workspace, files, and the search path. The Mathematical Function Library of the tool is a vast
collection of computational algorithms ranging from elementary functions, like sum, sine,

12

cosine, and complex arithmetic, to more sophisticated functions like matrix inverse, matrix Eigen
values, Bessel functions, and fast Fourier transforms.
The Language is a high-level matrix/array language with control flow statements,
functions, data structures, input/output, and object-oriented programming features. It allows
both programming in the small to rapidly create quick and dirty throw-away programs and
programming in the large to create large and complex application programs.
Graphics has extensive facilities for displaying vectors and matrices as graphs, as well as
annotating and printing these graphs. It includes high-level functions for two-dimensional and
three-dimensional data visualization, image processing, animation, and presentation graphics. It
also includes low-level functions that allow to fully customize the appearance of graphics as well
as to build complete graphical user interfaces on applications.
The Application Program Interface API is a library that allows writing C and FORTRAN
programs that interact with the tool. It includes facilities for calling routines from the tool,
calling it as a computational engine and for reading and writing MAT-files.

3.4.2. MODULE DESCRIPTION


In this project we have used only four Modules that are,

Image Acquisition

Image Resizing

Enhancement
o Contrast and Histogram Equalization
o Brightness enhancement

Noise Removal

3.4.3. IMAGE PROCESSING


Image processing is a method to convert an image into digital form and perform some
operations on it, in order to get an enhanced image or to extract some useful information from it.
It is a type of signal dispensation in which input is image, like video frame or photograph and
output may be image or characteristics associated with that image. Usually Image Processing
13

system includes treating images as two dimensional signals while applying already set signal
processing methods to them.
Image processing basically include the following three steps

Importing the image with optical scanner or by digital photography.

Analyzing and manipulating the image which includes data compression and
image enhancement and spotting patterns that are not to human eyes like satellite
photographs.

Output is the last stage in which result can be altered image or report that is
based on image analysis.

Purpose of image processing


The purpose of image processing is divided into 5 groups. They are:

Visualization - Observe the objects that are not visible.

Image sharpening and restoration - To create a better image.

Image retrieval - Seek for the image of interest.

Measurement of pattern Measures various objects in an image.

Image Recognition Distinguish the objects in an image.

3.4.4. IMAGE ACQUISITION


Digital imaging or digital image acquisition is the creation of digital images, such as of
a physical scene or of the interior structure of an object as shown in figure 1. The term is often
assumed to imply or include the processing, compression, storage, printing, and display of such
images. Image acquisition stage involves preprocessing, such as scaling.

Figure 1. Image Acquisition


14

Acquire input color fabric image to the MATLAB in image processing system. The
image formats are .tif, .Jpeg, and .png. In this paper we used color images (RGB images) and
separated into their components (Red, Green, and Blue). Contrast Enhancement: The Image
Processing Toolbox contains several image enhancement routines.
Step 1: Load images read an images: fabric.jpg and detect.jpg.
Step 2: Resize images to make the image comparison easier, resize the images to have the
same width & hight.
Step 3: Enhance grayscale images histogram equalization is applied to enhance the
contrast of fabric surface.

Figure 2. Capture the fabric image with fault

Figure 3. Gray Scale Image


15

Figure 2 and Figure 3 shows the acquired color fabric image and converted gray scale
image. The next step is to use the regions extracted by preprocessing and to extract segments that
correspond to the defects. The general concept of graph based methods and measures the
evidence of a boundary between two regions by computing :
(a) Intensity differences across the boundary and
(b) Intensity differences between neighboring pixels within each region. This is mainly
due to the use of the local thresholding method that performs well even when there is no uniform
background in the images. The graph based segmentation returned each of the detected objects as
a different segment colored randomly. The detected segments outside the image and the ones
with an area greater or smaller than a minimum (50 pixels) and maximum area (3500 pixels),
correspondingly.
3.4.5. RESIZING IMAGES
Resize is nothing but alter the size of (something, especially a computer window or
image) "drawings can be resized".
Resizing is the most obvious and common way to change the size of an image is to resize
or Scale an image. The content of the image is then enlarged or more commonly shrunk to fit the
desired size. But while the actual image pixels and colors are modified, the content represented
by the image is essentially left unchanged. The resize operator has been very carefully designed
to try to produce a very good result for real world images. Figure 4 shows the original captured
image and resized image.
Resizing of images is required in various applications. For example, in different
communication channels with different channel capacity, the same image may be transmitted at
different spatial (or spectral) resolutions. Interpolation techniques are frequently used for directly
resizing the image in the spatial domain. But for efficient storage, images are usually represented
in the transform domain as compressed data.

16

Original Image

Resized Image

Original Image

Resized Image

Figure 4. Original and Resized Image

3.4.6. ENHANCEMENT IN IMAGE PROCESSING


Enhancement is increase or improvement in quality, value. Image enhancement is the
simplest

and

most

appealing

areas

of

digital

image

processing.

Enhancement technique is bring out detail that is highlight certain features of interest in an
image. Example, increase the contrast of an image it looks better.
Image enhancement is the process of adjusting digital images so that the results are more
suitable for display or further image analysis. Example noise remove, sharpen or brighten an
image.

3.4.6.1.Contrast enhancement
Contrast enhancements improve the perceptibility of objects in the scene by enhancing
the brightness difference between objects and their backgrounds. Contrast enhancements are
typically performed as a contrast stretch followed by a tonal enhancement, although these could
both be performed in one step. A contrast stretch improves the brightness differences uniformly

17

across the dynamic range of the image, whereas tonal enhancements improve the brightness
differences in the shadow (dark), mid tone (grays), or highlight (bright) regions at the expense of
the brightness differences in the other regions. Figure 5 shows the captured original image and
contrast adjustment image.

Original Image

Low Contrast Image

Original Image

High Contrast Image

Figure 5. Original Image and Contrast Adjustment Image

3.4.6.2.Histogram for an image


An "image histogram" is a type of histogram that acts as a graphical
representation of the tonal distribution in a digital image. It plots the number of pixels for each
tonal value. By looking at the histogram for a specific image a viewer will be able to judge the
entire tonal distribution at a glance. Figure 6 shows the captured original image and its
histogram.

18

5000

4000

3000

2000

1000

0
0

50

100

150

200

250

Figure 6. Fabric Image and its Histogram

3.4.6.3.Histogram equalization
Histogram equalization is a method in image processing of contrast adjustment using the
image's histogram. Histogram equalization is usually increases the global contrast of many
images, especially when the usable data of the image is represented by close contrast values.
Through this adjustment, the intensities can be better distributed on the histogram. This allows
for areas of lower local contrast to gain a higher contrast. Histogram equalization accomplishes
this by effectively spreading out the most frequent intensity values. This method is useful in
images with backgrounds and foregrounds that are both bright or both dark. This method
produces unrealistic effects in photographs; however it is very useful for scientific images. There
are two ways to think about and implement histogram equalization, either as image change or as
palette change. The operation can be expressed as P(M(I)) where I is the original image, M is
histogram equalization mapping operation and P is a palette. If we define a new palette as
P'=P(M) and leave image I unchanged then histogram equalization is implemented as palette
change. On the other hand if palette P remains unchanged and image is modified to I'=M(I) then
the implementation is by image change. In most cases palette change is better as it preserves the
original data. Histogram equalization of color images also the same method of grayscale image;
Red, Green, Blue are the values of color image. Figure 7. (a) to (e) shows the Normal and
Histogram Equalized Image

19

(a). Histogram of an image before and after equalization.

(b). Normal

(c). Equalized

(d). Original Image

(e). Histogram Equalized Image

Figure 7. (a) to (e) shows the Normal and Histogram Equalized Image

3.4.7. NOISE REMOVAL


Image noise is random variation of brightness or color information in images, and is
usually an aspect of electronic noise. It can be produced by the sensor and circuitry of a scanner
or digital camera. Image noise can also originate in film grain and in the unavoidable shot
noise of an ideal photon detector. Image noise is an undesirable by-product of image capture that
adds spurious and extraneous information.

20

The original meaning of "noise" was and remains "unwanted signal"; unwanted electrical
fluctuations in signals received by AM radios caused audible acoustic noise ("static"). By
analogy unwanted electrical fluctuations themselves came to be known as "noise".[1] Image noise
is, of course, inaudible. Noise Removal is used for get the good visual image. Figure 8. shows
image before noise removal and after noise removal.

Figure 8. Image Before Noise Removal and After Noise Removal

3.4.7.1.Need for noise removal


Images are contaminated with noise during image acquisition or transmission. With each
digital image a signal is transmitted from a sensor to a memory of the camera. Transmission
technology is prone to a degree of error, and noise is added to each image. This transmission
error referred as salt and pepper or implusive noise.
In particular, introducing bit errors and implusive noise into an image not only lower its
perceptual quality, but also makes subsequent tasks such as edge detection and segmentation
more difficult.

So, such noise often a necessary preprocessing step in image processing

applications.
Thus noise removal filters takes a corrupted image as input and produce an estimation of
the original image without any noise.
3.4.7..2.Preprocessing techniques
Image pre-processing can significantly increase the reliability of an optical inspection.
Several filter operations which intensify or reduce certain image details enable an easier or faster
evaluation. Users are able to optimize a camera image with just a few clicks.
Preprocessing improves the quality of image while conserving the original image
information. It includes removal of blurring and noise, increases the contrast range to enhance
the image information.
21

3.4.7.3. Linear filter


Linear filters process time-varying input signals to produce output signals, subject to the
constraint of linearity. This result from systems composed solely of components (or digital
algorithms) classified as having a linear response. Most filters implemented in analog
electronics, in digital signal processing, or in mechanical systems are classified as causal, time
invariant, and linear signal processing filters.
The general concept of linear filtering is also used in statistics, data analysis, and mechanical
engineering among other fields and technologies.
3.4.7.4.Non-linear filter
Non-linear filters have many applications, especially in the removal of certain types
of noise that are not additive. For example, the median filter is widely used to remove spike
noise that affects only a small percentage of the samples, possibly by very large amounts. Indeed
all

radio

receivers use

non-linear

filters

to

convert kilo- to gigahertz signals

to

the audio frequency range; and all digital signal processing depends on non-linear filters (analogto-digital converters) to transform analog signals to binary numbers. Noise removal is one of the
application of Non-Linear Filter, Signals often get corrupted during transmission or processing;
and a frequent goal in filter design is the restoration of the original signal, a process commonly
called "noise removal".
3.4.7.5.Thresholding in image processing
Thresholding methods replace each pixel in an image with a black pixel if the image
intensity I i,j is less than some fixed constant T (that is, I i,j <T), or a white pixel if the image
intensity is greater than that constant. In the example image on the right, this results in the dark
tree becoming completely black, and the white snow becoming complete white.
3.4.7.6.Mean filter or average filter algorithm
1. Place a window over element;
2. Take an average sum up elements and divide the sum by the number of elements.
Mean=Sum of all data values/number of data values
Math equation,

_
X =x/n
22

The existing of the result calculate only the mean value for the pixel, now we use
histogram convert to threshold value that added to exist mean value so that give the best result of
the output image. Figure 9. shows captured original image and filtered image.

Figure 9. Original Image and Filtered Image

3.5. Particle Swarm Optimization (PSO)


The Particle swarm optimization (PSO), first introduced by Kennedy and Eberhart, is a
stochastic optimization technique that is similar to the behaviour of a flock of birds or the
sociological behaviour of a group of people. Consider a scenario in which a flock of birds are
searching for a piece of food in an area. All the birds do not exactly know where the food is, but
with each iteration they come to know how far the food is. The best strategy will be to follow the
bird which is near to food and also from its own previous best position. This is the basic idea on
which PSO works. In PSO algorithm the five essential parameters that are considered are as
tabulated in table 1. In the proposed technique, PSO is adopted to find optimal values of v and
r. This technique is a population-based optimization algorithm. It uses a number of agents
(particles) that constitute a swarm moving around in the search space looking for the best
solution. Each particle keeps track of its coordinates in the solution space which are associated
with the best solution (fitness) that has achieved so far by that particle.This value is called
23

personal best, pbest and another best value that is tracked by the PSO is the best value obtained
so far by any particle in the neighbourhood of that particle, is called global best, gbest. The basic
concept of PSO lies in accelerating each particle towards its pbest and the gbest locations, with a
random weighted accelaration at each time as shown in Fig. 10.

\
Table 1 - Particle Swarm Optimization
Parameters
particle
velocity
fitness
pbest
gbest

Description
candidate solution to a problem
rate of position change
the best solution achieved
best value obtained in previous
particle
best value obtained so far by any
particle in the population

Figure 11. Modification of a searching point by PSO


Sk : current searching point
Sk+1 : modified searching point
Vk : current velocity
Vk+1 : modified velocity
Vpbest : velocity based on pbest
Vgbest : velocity based on gbest

24

Each particle tries to modify its position using the following information: the current position,
the current velocity, the distance between the current position and pbest, the distance between the
current position and the gbest. Each particles velocity can be modified using the equation (1).

..............(1)
where, vik is the velocity of agent i at iteration k (usually in the range, 0.1- 0.9); c1 and c2 are the
learning factors in the range, 0 - 4; rand() is the uniformly distributed random number between 0
and 1; sik is the current position of agent i at kth iteration; pbesti is present best of agent i and
gbest is global best of the group. w, the inertia weight is set to be in the range, 0.1 - 0.9 and is
computed as:
...............(2)
Using the modified velocity, the particles position can be updated as:

...............(3)
The optimal values of v and r are found using the following procedure:
Step 1: Initialize particles with random position and velocity vector
Step 2: Loop until maximum iteration
Step 2.1: Loop until the particles exhaust

Step 2.1.1: Evaluate the difference between Discrete


Entropy values of original and
MHEed
image (p)
Step 2.1.2: If p<pbest, then pbest=p
Step 2.2: Goto Step 2.1
Step 2.3: Set best of pbests as gbest and record the values of v and r
Step 2.4: Update particles velocity using equation (1) and
position using equation (3)

25

Step 3: Goto Step 2


Step 4: Stop - Giving gbest, the optimal solution with optimal v
and r values
3.5.1.PSO in Preprocessing
The preprocessing stage is an essential initial step in the proposed patterned fabric defect
detection system. This phase focuses on techniques that enhance the patterned fabric image.
During image acquisition, inhomogeneities occur due to variance in relative position of the light
source, camera position and the textile position. These inhomogeneities make some part of the
image appear darker and many have uneven contrast. It accentuates or sharpens image features
such as edges, boundaries, or contrast to make a graphic display more helpful for display and
analysis. Image enhancement methods can be based on either spatial or frequency domain
techniques. Results of the proposed technique are compared with some other image enhancement
techniques, like linear contrast stretching, histogram equalization and genetic algorithm based
image enhancement. Both objective and subjective evaluations are performed on the resulted
image which says about the goodness of PSO. Figure 10 shows the captured original fabric
image and optimized fabric image using PSO.

Figure10. Original Image and Optimized Image

26

4. TESTING AND IMPLEMETATION


4.1. SYSTEM TESTING
System testing is the state of implementation, which is aimed at ensuring that the system
works accurately and efficiently as expect before live operation, commences. It certifies that the
whole set of programs hang together System testing requires a test plan, that consists of several
key activities and steps for run program, string, system and user acceptance testing. The
implementation of newly

design package is important in adopting a successful new system

Testing is important stage in software development. System test is implementation should


be a confirmation that all is correct and an opportunity to show the users that the system works as
they expected it accounts the largest percentage of technical effort in software development
process.
Testing phase is the development phase that validates the code against the functional
specifications. Testing is a vital to the achievement of the system goals. The objective of testing
is to discover errors. To fulfill this objective a series of test step such as the unit test, integration
test, validation and system test where planned and executed.

4.1.1. UNIT TESTING


Here each program is tested individually so any error apply unit is debugged. The sample
data are given for the unit testing. The unit test results are recorded for further references. During
unit testing the functions of the program unit validation and the limitations are tested.
Unit testing is testing changes made in a existing or new program this test is carried out
during the programming and each module is found to be working satisfactorily. For example in
the registration form after entering all the fields we click the submit button. When submit button
is clicked, all the data in form are validated. Only after validation entries will be added to the
database.
Unit testing comprises the set of tests performed by an individual prior to integration of
the unit into large system.
The situation is illustrated in as follows
Coding-> Debugging ->Unit testing -> Integration testing
The four categories of test that a programmer will typically perform on a program unit

Functional test
27

Performance test

Stress Test

Structure test

Functional test involve exercising the code with nominal input values for which the
expected results are known as well as boundary values and special values.
Performance testing determines the amount of execution time spent in various parts of
unit program through put and response time and device utilization by the program.
Structured testing is concerned with a exercising the internal logic of a program and
traversing paths. Functional testing, stress testing performance testing are referred as black box
testing and structure testing is referred as white box testing.

4.1.2. VALIDATION TESTING


Software validation is achieved through a serious of testes that demonstrate
conformity with requirements. Thus the proposed system under consideration has been tested by
validation & found to be working satisfactory.

4.1.3. INTEGRATED TESTING


Integrated testing is a systematic technique for constructing tests to uncover errors
associated with interface.
Objective is to take unit tested modules and build a program structure that has been
dictated by design.

4.1.4. ACCEPTANCE TESTING


Acceptance testing involves planning an execution of a functional test, performance
test and stress test to verify that the implemented system satisfies the requirement.
The acceptance testing is the final stage of the user the various possibilities of the
data are entered and the results are tested.

28

4.1.5. TESTING RESULTS


All the tests should be traceable to customer requirements the focus of testing will shift
progressively from programs Exhaustive testing is not possible To be more effective testing
should be which has probability of finding errors
The following are the attributes of good test
1. A good test has a probability of finding a errors
2. A good test should be best of breeds
3. A good test to neither simple nor too complex

4.2 SYSTEM IMPLEMENTATION


The purpose of System Implementation is to making the new system available to a
prepared set of users (the deployment), and positioning on-going support and maintenance of the
system within the Performing Organization (the transition). At a finer level of detail, deploying
the system consists of executing all steps necessary to educate the Consumers on the use of the
new system, placing the newly developed system into production, confirming that all data
required at the start of operations is available and accurate, and validating that business functions
that interact with the system are functioning properly. Transitioning the system support
responsibilities involves changing from a system development to a system support and
maintenance mode of operation, with ownership of the new system moving from the Project
Team to the Performing Organization.
List of System implementation is the important stage of project when the theoretical design is
tuned into practical system. The main stages in the implementation are as follows:

Planning

Training

System testing and

Changeover Planning

The purpose of Prepare for System Implementation is to take all possible steps to
ensure that the upcoming system deployment and transition occurs smoothly, efficiently, and
flawlessly. In the implementation of any new system, it is necessary to ensure that the Consumer
community is best positioned to utilize the system once deployment efforts have been validated.
Therefore, all necessary training activities must be scheduled and coordinated. As this training is
29

often the first exposure to the system for many individuals, it should be conducted as
professionally and competently as possible. A positive training experience is a great first step
towards Customer acceptance of the system.
During System Implementation it is essential that everyone involved be absolutely
synchronized with the deployment plan and with each other. Often the performance of
deployment efforts impacts many of the Performing Organizations normal business operations.
Examples of these impacts include:
Consumers may experience a period of time in which the systems that they depend on to
perform their jobs are temporarily unavailable to them. They may be asked to maintain detailed
manual records or logs of business functions that they perform to be entered into the new system
once it is operational. Technical Services personnel may be required to assume significant
implementation responsibilities while at the same time having to continue current levels of
service on other critical business systems. Technical Support personnel may experience
unusually high volumes of support requests due to the possible disruption of day-to-day
processing.

30

5. RESULTS AND DISCUSSIONS


A fabric database of 30 images with defect free and defected fabric images are
collected. A digital camera having high resolution is used for capturing the fabric images.
The captured image is stored in jpeg format. The acquired fabric images are in various
sizes, hence the images are resized and normalized using interpolation algorithm. Bilinear
interpolation algorithm used to normalize the captured image.

Input Image

Normalized Image

Input Image

Normalized Image

5000

4000

3000

2000

1000

0
0

50

100

150

200

250

Histogram for Histogram Equalized Image

Histogram Equalized Image


31

The outcome of the filtering algorithm is analyzed with Mean Square Error
(MSE). The MSE represents the average of the squares of the errors between the actual
fabric image and the filtered fabric image. The mathematical representation of MSE and
PSNR is as follows.
=

2
1
1
0
0 ( (, ) (, ))

Where m and n are the size of the image, f(i,j) is the original fabric image
and g(i,j) is the filtered fabric image.
The smaller MSE value shows that the better image has been reconstructed
from the degraded image. From the analysis of MSE values we conclude that the
improved mean filter performs comparatively better than mean filter.

Filtered Image

Normal

Filtered Image

Normal

32

6. CONCLUSION
It is easy to identify faults on fabric images and process by using this method. Thus the
MATLAB R2012a 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 and the
result calculated only with the mean value for the pixel and we convert histogram to threshold
value that added to exist mean value so that produce 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 Signal & Image
Processing and thresholding is done to obtain the intensity of the image . In future this can be
extended to any number of fault identifications on fabrics and can be processed.

6.1. Future Enhancement

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
33

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.

In future Content Management System will introduce. It will helps user to modify
their user screen. The data screens can be upgraded and menus can be easily added
when required. Items can be added to the forms when there necessity of new data.

The coding has been done cautiously so that any developer can follow the programs
easily with the knowledge of the convention followed hence it is easy to be
maintained.

34

7. BIBLIOGRAPHY
7.1. REFERENCES
1. Hasanul Kabir, Abdullah Al-Wadud, and Oksam Chae Brightness Preserving Image
ContrastEnhancement Using Weighted Mixture of Globaland Local Transformation
Functions (The International Arab Journal of Information Technology, Vol. 7, No. 4,
October 2010)
2. S.Anitha , V.Radha, Preprocessing using Enhanced Median Filter for Defect Detection
in 2D Fabric Images S.Anitha et al. / International Journal of Engineering and
Technology (IJET) (ISSN : 0975-4024 Vol 6 No 2 Apr-May 2014).
3. 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, Available @ http://www.ijritcc.org.
4. S.S. Bedi1 , Rati Khandelwal2 Assistant Professor, Various Image Enhancement
Techniques- A Critical Review(International Journal of Advanced Research in
Computer and Communication Engineering Vol. 2, Issue 3, March 2013)
5. Manpreet Kaur, Jasdeep Kaur, Jappreet Kaur Survey of Contrast Enhancement
Techniques based on Histogram Equalization ((IJACSA) International Journal of
Advanced Computer Science and Applications, Vol. 2, No. 7, 2011)
6. Mr. Rohit Verma, Dr. Jahid A Comparative Study of Various Types of Image Noise
and Efficient Noise Removal Techniques ( Volume 3, Issue 10, October 2013)
Available online at: www.ijarcsse.com
7. Wanhyun Cho, Seongchae Seo, Jinho You, Soonja Kang Enhancement Technique of
Image Contrast using New Histogram Transformation (Journal of Computer and
Communications,

2014,

2,

52-56

Published

Online

January

(http://www.scirp.org/journal/jcc) http://dx.doi.org/10.4236/jcc.2014.22010.

35

2014)

8. Wanhyun Cho, Seongchae Seo, Jinho You, Soonja Kang Enhancement Technique of
Image Contrast using New Histogram Transformation(Indian Journal of Fibre and
Textile Research Vol. 39, September 2014)
9. S.Anitha, Dr.V.Radha, Contrast stretching and non-linear median filters for fabric
inspection s.anitha et al,/((IJCSIT) International Journal of Computer Science and
Information Technologies, Vol.2(2),2011,836-839)
10.

Dr.G.M.Nasira , P.Banumathi Plain Woven Fabric Defect Detection Based on Image


Processing and Artificial Neural Networks (International Journal of Computer Trends
and Technology(IJCTT) volume 6 number 4Dec 2013 ISSN: 2231-2803)
www.internationaljournalssrg.org Page 226.Textile industry is one of the revenues
generating industry to Tami Nadu.

36

8. APPENDICES
A. DATA FLOW DIAGRAM
EXPLORING IMAGE ENHANCEMENT AND OPTIMIZATION TECHNIQUES FOR FABRIC
DEFECT IDENTIFICATION

Image Acquisition

Image Enhancement

Contrast

Brightness

Threshold Calculation
Noise Removal

Mean Filter

Improved Mean Filter

Outcomeofofthe
theProject
Project
Outcome

37

Histogram Equalisation

A. SAMPLE INPUT AND SAMPLE OUTPUT


INPUT IMAGE 1

HSV AND FILTERED IMAGE FROM INPUT IMAGE 1

41

HISTOGRAM FOR INPUT IMAGE 1

FABRIC DEFECT RGB FOR IMAGE 1

42

DEFECT FREE INPUT IMAGE 2

HSV AND FILTERED IMAGE FROM INPUT IMAGE 2

43

HISTOGRAM FOR INPUT IMAGE 2

IDENTIFY FABRIC DEFECT RGB FOR IMAGE 2

44

INPUT IMAGE 3

HSV AND FILTERED IMAGE FROM INPUT IMAGE 3

45

HISTOGRAM FOR INPUT IMAGE 3

IDENTIFY FABRIC DEFECT RGB FOR IMAGE 3

46

INPUT IMAGE 4

HSV AND FILTERED IMAGE FROM INPUT IMAGE 4

47

HISTOGRAM FOR INPUT IMAGE 4

IDENTIFY FABRIC DEFECT RGB FOR IMAGE 4

48

You might also like