An Efficient System For Automatic Sorting of The Ceramic Tiles

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

An Efficient System for Automatic Sorting of the Ceramic Tiles

Ataollah Ebrahimzadeh

Mahdi Hossienzadeh

Faculty of Electrical and Computer Engineering, Babol University of Technology


Abstract-

the

ceramic

tile

manufacturing

process

was developed to detect both color and texture-formation


defects in randomly textured ceramic tiles.
The objective of our research is to propose an efficient
automatic inspection system for classification of defects at a
high rate within a very short time. We apply the co
occurrence matrix to extract the features of the ceramic tiles
such as ASM, IDF, Contrast and Entropy. As the classifier,
we use a multi-layer Perceptron neural network with
different number of layers and different training algorithms
and compare them.
The rest of paper is organized as follows. Section 2
describes the features. Section 3 presents classifier and its
learning algorithms. Section 4, shows some experimental
results. Finally, Section 5 concludes the paper.

is

completely automated with the exception of visual inspection of


the product (sorting stage). There are a number of methods for
the automatic detection of multifarious range of ceramic tile
defects and automatic sorting of them. In these methods it is
necessary a tradeoff between sorting accuracy and the rate of
computation. In this paper we propose a system that uses
machine-vision techniques for sorting the ceramic tiles. We
apply the co-occurrence matrix to extract the features of
ceramic tiles such as ASM, IDF, Contrast and Entropy. As the
classifier, we use a multi-layer perceptron neural network. We
investigate the performance of the proposed system with
different number of layers and different training algorithms of
neural networks to classify ceramic tiles into four groups. We
compare their speed and accuracy.
Keywords- Sorting of the ceramic tile,

II.

machine vision,

co-occurance matris, multi-layer perceptron neural network,


training algorithms, feature extraction.

I.

FEATURE EXTRACTION

In this paper we use the co-occurrence matrix in order to


extract the features of the ceramic tiles. This is method have
been applied to texture classification of aerial photographs
and photomicrographs [5]. More than two parameters are
entered into the scene. There are the relative distance among
the pixels and their relative orientation. Let d the relative
distance measured in pixel numbers (d=1 for neighboring
pixels, etc.). The orientation <I> is quantized in four
directions: horizontal, diagonal, vertical and anti-diagonal
(0, 45, 90, 135). For each combination of d and <I> a
two-dimensional histogram is defmed:

INTRODUCTION

In the production chain of ceramic tiles there are


numerous ways for going to wrong. Every failure directly
reflects on the final ceramic tile. The fmal production phase
is sorting of ceramic tiles. Purposes of this phase are
rejecting defective parts such as physical defect and color
shading. In most cases the last phase of sort tile in classes of
quality is based on human perception capability. Human
resources as controllers in this phase are very unreliable. In
this case an automatic system fully replaces human resources
and in synergy with appropriate algorithms it could be even
more powerful than men as a visual inspection resource. The
great majority of ceramic tile faults are surface defects, such
as cracks, crazing, dry spots, pin hole, glaze d diversification,
blister, etc. therefore surface inspection is one of the most
important quality control tasks to be automated.
Nowadays digital image processing is used to extract
various features from images. One of the most important
operations on digital image is to identify and classify various
kinds of defects for classification. Therefore automating of
stage for inspection of the product quality and classification
of them leads to using machined vision and image processing
systems.
In the literature there are some works in this area. In [1],
Boukouvalas et al. applied techniques based on a set of
separable line filters, through textured tile crack detector
based on the Wigner distribution and a conjoint spatial
spatial frequency representation of texture, to a color texture
tile defect detection algorithm. The Wigner method was used
by Song et al. [2] for crack detection in texture image. In [3],
Elbehiery et al. divided their method into two parts. In the
first part, existing method consisted with the captured images
of tiles as input. As the output, they showed the intensity
adjusted or histogram equalized image. In [4], Song et al.
Presented Chromato-Structural Defect Detection technique

= 0 p(I(m,n))=Ivl(md,n) = 12
:p(/(m,n))=lvl(md,n=td)=/2
4>= 90 :p(I(m,n))=Ivl(m,n=td)= 12
4>= 135 :p(/(m,n))=Ivl(md,nd) = 12
4>

4>=45

Where

P(IlI 12) =

T](l [2)

(1)

Number of pairs of pixels at distance d with values(llh)


Total number of possible paire

(2)

For each of these histograms an array is defmed, known


as the co-occurrence matrix. From the defmition of the co
occurrence matrix, it is apparent that it is a symmetric one,
something that can be used to reduce subsequent
computations. Having defined probabilities of occurrence of
grey levels with respect to relative spatial pixel position, we
will go ahead to define the corresponding features. These
features have a direct physical interpretation with respect to
texture.
i) Angular second moment: This feature is measure of the
smootlmess of the image. The less smooth the region is, the
more uniformly distributed P (i, j) and the lower the ASM. It
can be defined by:
ASM

372

g-l t:l g-l( ( ' '))2


''t=O .. }=O p 1,}

(3)

ii) Contrast: this is a measure of the image contrast that is, a


measure of local gray level variations. Contrast takes high
values for images of high contrast:
CON

Ng-l n 2 {Ng-l Ng-l ( C' o)2}


- n=O
p t,l
i=O j=o
Ii - jl = n

and biases. To overcome these problems, the resilient back


propagation (RP) is proposed.
The BP algorithm network is usually time-consuming in
training phase. The conjugate gradient algorithms are
proposed to overcome this problem. In the conjugate
gradient algorithms a search is made along the conjugate
gradient direction to determine the step size which will
minimize the performance function along that line. This
produces generally faster convergence than steepest descent
directions. All of the conjugate gradient algorithms start out
by searching in the steepest descent direction (negative of the
gradient) on the first iteration:
(8)
Po = -go
A line search is then performed to determine the optimal
distance to move along the current search direction:
(9)
Wk+1 = Wk + akPk
The next search direction is then determined so that it is
conjugate to previous search directions. The general
procedure for determining the new search direction is to
combine the new steepest descent direction with the previous
search direction:
(10)
Pk = -gk + kPk-l
The way in which the k constant is computed
distinguishes the various versions of conjugate gradient. For
the Fletcher-Reeves update the procedure is:

(4)

iii) Inverse difference moment: this feature takes high values


for low-contrast images due to the inverse Ci dependence:

j)2

IDF

g-l r:' g-l (p(i,j))


t=O J=O 1+(i-j)2

(5)

ivY Entropy: is a measure of randomness and takes low


values for smooth images. Figure 1 show the result of these
four features in texture and plain tile:
Hxy

Ng-lNg-l ( . .)
( . .)
i=O j= o P l,l I og2 P l,l
III.

(6)

CLASSIFIER

In this paper, we use a MLP neural network as the


classifier. A MLP neural network consists of an input layer
(of source nodes), one or more hidden layers (of computation
nodes) and an output layer [6]. The number of nodes in the
input and the output layers depend on the number of input
and output variables, respectively. The number of the hidden
layer neurons should be determined manually or by
optimization problem.
The issue of learning algorithm and its speed is very
important for MLP. Back-propagation (BP) learning
algorithm is still one of the most popular algorithms. In BP a
simple gradient descent algorithm updates the weight values:
(7)
Wk+1 = Wk - akgk

/l
ggk
I-'k - gkT gk-1
-1
_

(11)

This is the ratio of the norm squared of the current


gradient to the norm squared of the previous gradient.
Another version of the conjugate gradient algorithm was
proposed by Polak and Ribiere. As with the Fletcher-Reeves
algorithm, the search direction at iteration is determined by:
(12)
Pk = -gk + kPk-l
For the Polak-Ribiere update, the constant k is
computed by:
Q _
I-'k -

where Wk is a vector of current weights and biases, gk is the


current gradient, and ak is the learning rate. With standard
steepest descent, the learning rate is held constant throughout
training, which makes the algorithm very sensitive to the
proper setting of the learning rate. If the learning rate is set
too high, the algorithm may oscillate and become unstable. If
the learning rate is too small, the algorithm will take a long
time to converge. However, the performance of the algorithm
can be improved if we allow the learning rate to change
during the training process. An adaptive learning rate will
attempt to keep the learning step size as large as possible
while keeping the learning stable [7]. The Variable Learning
Rate Back-propagation (GDX) algorithm uses the adaptive
learning rate with momentum training. Gradient descent with
momentum is one of the variations of gradient descent that
allows a network to respond not only to the local gradient,
but also to recent trends in the error surface.
Multilayer networks usually use sigmoid transfer
functions in the hidden layers. These functions are able to
compress an infinite input range into a finite output range.
There is a problem in using the steepest descent training
method, because the gradient maybe have a very small
magnitude and, therefore, cause small changes in the weights

.6.g-1gk
gTk-1gk-1

(13)

For all conjugate gradient algorithms, the search direction


is periodically reset to the negative of the gradient. The
standard reset point occurs when the number of iterations is
equal to the number of network parameters (weights and
biases), but there are other reset methods that can improve
the efficiency of training. One such reset method was
proposed in [8]. The line search is computationally
expensive, because it requires that the network response to
all training inputs be computed several times for each search.
The scaled conjugate gradient algorithm (SCG), developed
by Moller [9]. Newton's method is an alternative to the
conjugate gradient methods for fast optimization. The basic
step of Newton's method is:
(14)
Wk+1 = Wk - Akl gk
where A, is the Hessian matrix (second derivatives) of the
performance index at the current values of the weights and
biases. Because of the expensive because of the computation
of the Hessian matrix, usually some of algorithms which do
not require the calculation of second derivatives are
proposed. These are called quasi-Newton (or secant)
methods. The quasi-Newton method, which has been most
successful in published studies, is the Broyden, Fletcher,

373

TABLE II.

Goldfarb, and Shanno (BFGS) update [7].The one step


secant (OSS) method is an attempt to bridge the gap between
the conjugate gradient algorithms and the quasi-Newton
(secant) algorithms. This algorithm does not store the
complete Hessian matrix. The Levenberg-Marquardt (LM)
algorithm [10] uses the approximation to the Hessian matrix
in the following Newton-like update:
Wk+1
Wk
[JTJ + IlI]-l JTe
(15)
=

Network
Hidden
Layers

EXPERIMENTAL SET UP AND RESULTS

Classe
s
1
2
3
4

Test (%)

No of
Epochs

RP

95

94.11

67

BFGS

92.50
96.25
93.75

88.23
88.97
88.23

33
54
25

4'8

LM

31

97.50

97.05

10

96.25

96.32

13

4'8

93.75

88.97

10000

93.75

89.70

10000

BP

V.

CONCLUSION

In this paper, we have proposed a number of efficient


methods to accurately classify ceramic tiles for a relatively
large set of data. These methods include three modules:
defming co-occurrence matrix from ceramic tile figure, a
feature extraction module include ASM, CON, IDF, Entropy
and a classifier include MLP Neural Network. Classification
abilities of these algorithms were compared for four different
classes of ceramic tiles. Four architectures with one hidden
or two hidden layers were chosen for this investigation.
These networks were trained with four different training
algorithms. Simulation results show that the LM algorithm
possessed the best convergence rate and the best accuracy.
Other classifiers with higher overall recognition accuracies
may also be studied.

REPRESENTATION OF THE DESIRED NEURAL NETWORK


OUTPUTS FOR FOUR TILES

Description

Train (%)

10
4'8
10

10

In this study we used 216 ceramic tiles for four classes.


We randomly selected 34 Tiles from each class for training
and used 20tiles for testing of the neural networks. Images of
the ceramic tiles are acquired using a colored scanner having
a resolution of 300 dpi. Simulation was performed in Matlab
7.6. We extracted the ASM, CON, IDF, Entropy features
from the co-occurrence matrix.
Various network architectures were evaluated to find an
optimum solution for the fmal result. The output vector is
defmed with a combination of 1s or 0 s to represent each of
the classes being recognized. Table 1 shows the 4 classes of
tiles and representation of the desired neural network
outputs.
TABLE I.

Training
Function

4'8

where J is the Jacobean matrix, e is a vector of network


errors, and 11 is a constant.
IV.

COMPARISON AMONG ACCURACY AND NO OF EPOCHS OF


IMPORTANT TRAINING ALGORITHMS

Neural Network
Outputs

REFERENCES

none defects
few defects
still acceptable
defects
unacceptable
defects

1
0

0
1

0
0

0
0

We investigated two architectures of neural networks.


NETt has a single hidden layer with 10 neurons. A tan
sigmoid transfer function was selected for hidden layers. The
output layer transfer functions for fitting problems are
generally selected to be tan-sigmoid. However, we propose
NET2 with two hidden layer (4*8). In order to compare the
convergence speed of different training algorithms, the
classifiers were trained for a predetermined value of mean
squared error (MSE). The number of training iterations and
the time required to achieve the mentioned value of error
were recorded. MSE was set to 0.001. The results are shown
in Table 2. In order to simplifying the comparison among the
different results in Table 2, we illustrate the best results for
each of the network structures in bold characters. For
example it can be seen that for LM (with 4x8 neurons) the
best test accuracy and the fewest epoch numbers are obtained
with the LM (with 10 neurons).

374

[I]

C. Boukouvalas, l Kittler, R. Marik, M. Mirmehdi, and M. Petrou,


Ceramic tile inspection for colour and structural defects, under
BRITE-EURAM, project no. BE5638, pp 6, University of Surrey,
2006.

[2]

K.Y. Song, M.Petrou, and J.Kittler, Wigner based crack detection in


texture image, University of Surrey, 1998.

[3]

H. Elbehiery, A. Hefnawy, and M. Elewa, "Surface defects detection


for ceramic tiles using image processing and morphological
techniques", Proceedings of World Academy of Science, Engineering
and Technology, vol 5, pp 158-160, 2005.

[4]

SongK Y, Kittler J, PetrouM, and Ng I, Chromato-Structural


approach towards surface defect detection in random textured
images, SPIE 2183,193- 204, 1994S. Theodoridis, K. Koutroumbas,
Pattern Recognition, Athens, Greece,
1999.

[5]

S. Haykin, Neural Networks: A Comprehensive Foundation, 2nd


Edition, Prentice-Hall, NJ, USA, 1999.

[6]

Howard Demuth and Mark Beale, Neural Network Toolbox User's


Guide,
The Mathworks, Inc., 1997.

[7]

Powell, M.lD., "Restart procedures for the conjugate gradient


method," Mathematical Programming, Vol. 12, 1977, pp. 241-254.

[8]

Moller, M.F., "A scaled conjugate gradient algorithm for fast


supervised learning," Neural Networks, Vol. 6, 1993, pp. 525-533.

[9]

Hagan, M.T., and M. Menhaj, "Training feed-forward networks with


the Marquardt algorithm," IEEE Transactions on Neural Networks,
Vol. 5, No. 6, 1999, pp. 989-993, 1994.

You might also like