Anda di halaman 1dari 6

The Method of Intelligent Inspection of Product

Quality Based on Computer Vision


1, 2 1
YAN Tai-shan CUI Du-wu
(1. Institute of Automation Science, Xi’an University of Technology, Xi’an, Shaanxi 710048)
(2.Department of Computer Science, Hunan Institute of Technology, Yueyang, Hunan 414000)
E-mail: yantaishan163@163.com Tel 0-13087577636

Abstract—The technique of automated visual inspection is a


new development in computer inspection. It has many
advantages such as no touching with inspected objects, high II. THE TECHNIQUE OF AUTOMATED VISUAL
speed, high efficiency and good flexibility, etc.. So it has
extensive applied foreground in the modern automatic INSPECTION
inspection of product quality. This paper introduces the
general structure of the computer vision inspection system,
expounds the realization method of an on-line crack The computer vision science is an edge subject, which
inspection system of glass bottles, which combines with touches upon many fields such as computer, automation,
neural network principle. The system’s ability to learn itself integration technology, optics, vision mental and
and adapt itself is very powerful, it has realized a quick and psychology, brain research, etc.. Its range of research is
exact inspection of the on-line glass bottles’ crack very wide, includes the overwhelming majority contents
successfully. of image processing, such as toning and recovering
Index Terms—Product Quality; Technique of Automated images, getting the edge, picture partitioning, veins
Visual Inspection; Neural Network; Image Collecting; analyzing, shape analyzing, etc.. And includes the
Image Processing contents of knowledge denotation, logical reasoning,
knowledge base, artificial intelligence, etc..
The technique of automated visual inspection based on
. INTRODUCTION computer vision is a kind of method doesn’t touch with
the inspected objects. This method uses the integrated
technology of image processing, exactitude measure,
Product quality is the life of business enterprises, only
pattern recognition, artificial intelligence, etc.. Its basic
the objective and strict inspection can promise the best
principle is to analyze the target images obtained by the
quality of products left factories. Therefore, the product
computer vision system in order to get the necessary
quality inspection is a key job of business enterprises.
measuring information, and judge whether the measured
Along with the development of production, it is not
target is norm or not according to the known knowledge.
trusted to inspect the products on large-scale lines with
The technique of automated visual inspection can realize
human eyes, and the method of automatic inspection of
on-line real time inspection and inspect products
product quality based on computer vision has already
absolutely, which doesn’t like the sampling inspection
been extensive among the business enterprises’ favor.
only inspect the products partly. Because the inspecting
speed of the computer vision inspection system is
decided by the speed of the low layer image processing
largely, so, if the fast image processing arithmetic,
high-speed CPU and parallel processors are adopted, the to a designed place and is detected by the position sensor,
on-line inspecting speed can be raised distinctly. Thanks the position sensor will produce an electricity pulse
to the outstanding advantages such as no touching with signal of "detecting an inspected object", and calculate
inspected objects, high speed, high efficiency and good the exact time when the object moves to the collecting
flexibility etc., the technique of automated visual position of the CCD camera by an appropriate delay,
inspection has an extensive applied foreground in the then send out a trigger signal to the image collecting card
[1][ 2 ]
modern automatic inspection of product quality . accurately. The image collecting card will demand the
CCD camera to collect images immediately after
detecting this signal, and send the object images to a
III. THE FUNCTION MODULE STRUCTURE OF buffer in the format of BMP document.
The image processing module processes and judges
THE COMPUTER VISUAL INSPECTION SYSTEM the collected images using the image processing and
inspecting software, and gets a conclusion whether the
inspected object is in accord with the beforehand
The computer visual inspection system generally established request or not.
includes a few modules as following: the image The task of the machine-electricity performing module
collecting module, the image processing module, the is to do a corresponding processing work for the
system controlling module, the machine-electricity inspected objects according to the inspection conclusion
performing module and the person-machine alternating of the image processing module, namely "qualified" or
module. Fig.1 illustrates the logic relation between these "unqualified" signals.
[ 2]
modules .

IV. AN EXAMPLE OF THE COMPUTER VISUAL

INSPECTION SYSTEM——ON-LINE CRACK

Fig.1. The function module structure of the computer


INSPECTION SYSTEM OF GLASS BOTTLES
visual inspection system
The system controlling module is the core of the
whole system. From triggering the position information
The packing glass bottle is a head product of the glass
of the object to getting the inspecting result information
enterprises. The quality problem of the packing bottles
which the machine-electricity performing module needs,
may cause the packed beverage’s metamorphosing, or
all works can not be accomplished without the
even cause an explosion and injure person. So, it is very
participation of the system controlling core.
necessary to inspect the quality of glass bottles
The person-machine alternating module provides a
automatically.
person-machine alternating environment in which some
The on-line crack inspection system of glass bottles
works of the operator can be accomplished such as
inspects the cracks of on-line glass bottles with the help
renewing the real time parameters, inquiring the system
of the technique of automated visual inspection, which is
and performing the real time instruction etc.. This
an important aspect of the inspection of glass bottles’
module needs correspondence directly with the
quality. In order to strengthen the system’s ability to
controlling core during its work time.
learn itself and adapt itself, BP neural network is
The image collecting module realizes the images’
introduced in the system, and build up a crack inspection
obtaining and saving. When the inspected object moves
model of glass bottles based on BP neural network. This
C. The Position Sensor
system is realized with Visual C++.
The on-line crack inspection system of glass bottles is
Fig.3 illustrates the circuit of the position sensor.
formed mainly by a personal computer with an image
collecting card inside, a CCD camera, a position sensor,
light sources and a set of image processing and
inspecting software. Fig.2 illustrates the working flow of
the system.

Fig.3. The circuit of the position sensor


When there is no glass bottle passes the triggering
position, the light emitted from the laser tube LD is
received by the receiving tube T, the circuit maintains a
stable state and there is no signal output. When the glass
bottle arrives to the triggering position, the light emitted
from the laser tube LD is blocked by the glass bottle, the
Fig.2. The working flow of the on-line crack
light received by the receiving tube T changes abruptly, a
inspection system of glass bottles
trigger pulse is produced by the triggering circuit. The
trigger pulse will make the image collecting card work
A. The Personal Computer System
after an appropriate delay.

The basic scheme of the personal computer system


D. The Light Sources
mainly includes a Pentium III CPU, a 128 M inner
memory, a 20G outer memory, a 32 Bits true colorful
Each inspecting position has an assistant light source
display whose resolving power is 1024*768 and a CA-
and a background light source. We choose the common
MPE-1000 black and white image collecting card etc..
parallel light source as the assistant light source, the
Windows98 is used as the operating system.
radius of its light beam is 30 millimeters. The light
The image collecting card can receive an outside
source of the background is a white light box with small
trigger signal, its importation mode is designed for the
power lights inside, the brightness of which can be
NTSC system, the way in which the images show is
adjusted in a certain scope.
designed for fields.

E. The Image Processing and Inspecting Software


B. The CCD Camera

The image processing and inspecting software


We adopt the line CCD black and white camera
includes six parts, they are image pre-processing, image
MTV-1881EX with high amalgamation, high definition
partitioning, characteristic extracting, data
and synchronization with the outside trigger signal. The
pre-processing, neural network training and neural
exposure time of the camera is 1/1000 second.
network inspecting.
1) Image pre-processing
The function of image pre-processing is to do some
operations such as modifying the luminance of the
images, smoothing the noise, sharpening the images and describe the essential characteristic of the object
[ 3]
median filtering etc . for the collected images completely or not when we choose the characteristic
according to their deficiency and the concrete vector. If the characteristic vector can't express the
researching purpose. The image pre-processing characteristics of the object effectively, there may be a
arithmetic of this system is used to smooth noise, the big error between the fact and the export of nerve
method of averaging adjacent areas is used to judge network in the course of training. Certainly, the
whether noise is contained by each pixel or not. If the dimension of the selected characteristic vector can't be
luminance of a pixel’s eight adjacent areas is represented too big, because the increasing of the dimension of input
characteristic vector will make the calculation of the
by Oi (i = 1, 2,⋅ ⋅ ⋅,8) , the method of averaging adjacent
nerve network grow rapidly, even cause the combination
areas can be expressed as following: explode.
Since the information of two-value images and
original images of glass bottles is too big, this kind of
information can't be provided to BP nerve network
directly. So, we must sample some characteristics from
In the formula, ε is called threshold, its value can be two-value images and original images of glass bottles in
chose according to the admitted degree of error. order to distinguish the images with crack spot and
[ 4 ][ 5 ]
2) Image partitioning images without crack spot .
Image partitioning is a key work of image processing. In the images processed by this system, the rectangle
Its function is to divide digital images into some areas area that includes the scope where the crack spots may
that do not superpose with each other, detect each object appear is called Area Of Interest, whose brief name is
or each part of an object in an image, and separate them AOI as Fig.4 shows.
[ 3]
from the other scenery . The method of threshold
partition is used in this system. Select an appropriate
threshold at first, and then compare each pixel’s
luminance of the images of glass bottles with it, (a)
reallocate the luminance the biggest value (255) or the Original image (b) Two-value image
lowest value (0) when it exceeds or under the threshold. Fig.4. Area Of Interest
In this way, a new tow-value image can be formed, and In order to distinguish the images with crack spot and
the object unveils from the background successfully. images without crack spot, we choose four
When we partition with the method of threshold, the characteristics from two-value images and original
key work is to choose a suitable threshold. The images of glass bottles, they are the value of background
luminance’s square diagram of the images processed by luminance, the size of AOI spot, the highest luminance of
this system belong to the double peak model, in order to AOI and the distance between AOI spot and background.
reduce the wrong rate to the least, we may choose the These four characteristics constitute the input
[ 4 ][ 5 ]
luminance value of the middle valley bottom as the characteristic vector of BP nerve network .
threshold. 4) Data pre-processing
3) Characteristic extracting Data pre-processing means to change the data obtained
Characteristic extracting means to measure the objects by the characteristic extracting module into unitary data
and produce a set of characteristics based on image for the purpose of being input nerve network and
partitioning. A characteristic vector will be formed if processed.
these characteristics are combined together. In nerve networks, the activating function usually
We must consider whether the selected vector can adopts the saturated nonlinear function, this system
[ 4 ][ 5 ]
adopts a Sigmoid function as following :
In the formula, N H stands for the best node number
1
f (x ) =
1 + e−x of hiding layer, N I stands for the best node number of

So, the pseudo saturated phenomenon (platform


input layer, N O stands for the best node number of
phenomenon) will appears during the network’s training
process. In order to prevent the neural cells from entering
output layer, N P stands for the number of the training
saturated state and reduce the possibility of the platform
phenomenon’s appearing, we must limit the input extent sample. Twenty-eight training samples are selected in
value of neural networks, implement a unitary processing this system, we can know the best node number of hiding
for the input pattern of the network, and the unitary layer is 16 through calculation. So, the BP nerve
processing should be implemented in the preprocessing network’s structure of this system is 4-16-1.
stage. The typical unitary processing method is In order to avoid BP neural network’s falling into the
[5]
following : local infinitesimal and speed up training, a method of
[6]
maxval=the biggest value of the data muster additional momentum item is adopted in this system .
minval=the smallest value of the data muster This method means to add an item in proportion to the
for(all input pattern) former variety to the current variety of the connected
for(all input unit) coefficient between every two nodes and threshold, and
pattern[i][j]=(pattern[i][j]-minval)/(maxval-minval) the new connected coefficient between every two nodes
5) Neural network training and threshold will be produced according to the reverse
At first, we must ascertain the structure of the adopted transmission. The regulating formulas with additional
BP nerve network. In BP neural networks, the node momentum item of connected coefficient between every
number of input layer is decided by the dimension two nodes and threshold are following:
number of input characteristic vector. The dimension
ΔW jt (k + 1) = (1 − mc ) ⋅ α ⋅ d tk ⋅ b j + mc ⋅ ΔW jt ( k )
number of input characteristic vector is 4 in this system,
so the node number of input layer is 4. The node number
Δθ t (k + 1) = (1 − mc ) ⋅ α ⋅ d tk + mc ⋅ Δθ t (k )
of output layer can be equal to the pattern category
number generally, the pattern category can also be In the formulas, k stands for the training times, mc
expressed by the coding of output nodes. Because the stands for the momentum factor, and the general value of
quality of glass bottles has only two types: Qualified and mc is 0.95 or so.
unqualified. Therefore the node number of output layer −4
Under the giving accuracy MSE ≤ 10 , BP nerve
may be one, its output value 0 means qualified bottles
(have no crack) and 1 means unqualified bottles (have network arrived at convergence when trained the chosen
cracks). The node number of hiding layer has a direct samples well. And the last values of each node’s
relation with the request of the input problem, the node threshold and the connected coefficient between every
number of output layer and input layer and the number of two nodes were written in a document, this was the
training samples generally. A simple practical method to training result of the neural network.
estimate the node number of the hiding layer is 6) Neural network inspecting
[ 4 ][ 5 ]
following : A characteristic vector is obtained after the images of
the detected glass bottle have been processed in this
system. This vector is a new input pattern of BP neural
N H = N I × NO + N P / 2
network. The neural network inspecting means to
identify and classify the new input pattern of network by
using the training result, that is namely to detect the its application in industrial detection[D]. Guilin: Guangxi
crack of glass bottles and export the inspecting result. At Normal University, 2001
last, each inspected glass bottle will be processed [6] Wang Wei. The artificial neural network principle-the
correspondingly by the performing machine. primer and application[M]. Beijing: Beijing aviation and
aerospace university publishing company,1995

. CONCLUSION Author's brief introduction:


Taishan Yan was born in Hunan Province, China,
in 1968.He received the M.S. degree in circuit and
The on-line crack inspection system of glass bottles
system from Guangxi Normal University, Guilin, China,
based on the technique of automated visual inspection
in 2001.
has realized image collecting, image processing and
He is currently a PhDcandidate in the Institute of
image inspecting successfully. A large number of on-line
Automation Science, Xi’an University of Technology, Xi’an,
experiments show that the right inspecting rate of this
China. His research interests include neural network,
system is one hundred percent, which is a very
pattern recognition and image processing.
satisfactory result. And this system can also satisfy the
Duwu Cui was born in Shaanxi Province, China, in
demand of production in speed. Since combines with
1945. He is currently a Professor and Doctoral Advisor at
neural network principle and a crack detection arithmetic
Xi’an University of Technology. His present research
of glass bottles based on BP neural network is build up,
interests include intelligent calculating, neural network,
the crack inspection system of glass bottles has a good
pattern recognition, etc..
ability to learn itself and adapt itself. Even the
environment condition changes during the period of
detecting, so long as provide the new samples to the
nerve network in time in order to let the neural network
train again, the system will adapt this new environment
very quickly. If the scheme of hardware is elevated, the
real on-line inspecting speed can also be raised.
REFERENCES
[1] Wu Chun-Ling. The research on inspection system of
mechanical parts number based on computer vision[J].
The modern produce engineering,2006,13(4):101-103
[2] Zhao Zhi-Qiang, Xiong Yuan-Jiao. The general
design system scheme to build the detecting system
based on computer vision [J]. The industry controlling
computer,2005,18(10):1-2
[3]Zhu Zhi-Gang, Shi Ding-Ji. Digital image
processing[M]. Beijing: Electronic industry publishing
company,1998
[4] Yan Tai-Shan. Crack detection model of glass bottles
based on BP artificial neural network [J].Science and
information development and
economy,2005,15(15):182-183
[5] Yan Tai-Shan. The study of ANN BP algorithm and

Anda mungkin juga menyukai