A Case Study of Automated Inspection

This article describes the application of machineprocesses employ a pre-printed plastic template
vision techniques that can be applied toto be placed in the mold cavity, like the one
automatically detect incorrectly placed labels in ashown in Figure 1. Figure 2 shows an example of
manually loaded injection molding process. In thiscomplete molded parts with prints showing.The
application, simple techniques involving countingtemplate is inserted in the mold cavity, usually
features are used to check orientation along aupside down so as to obtain the correct
particular direction. If the part is incorrectly placed,orientation of the print. Once the template is
the vision system sends a signal through its inputsecured in the cavity, the mold is closed and the
and output (I/O) system, and an external devicemolding is done over the print. The part is then
such as a buzzer or warning light will be activated.retrieved and manually inspected for quality.
The use of more advanced techniques such asUsually, this inspection process is not done on all
character recognition and template matching arethe parts and at times, a fatigued operator may
also discussed with specific applications inmiss discovering a poorly printed part before it is
inspecting the quality of print.shipped to the customer.
In order to segment a region into foreground andIn order to avoid heavy penalties that are usually
background, it is necessary to threshold an image.imposed for supplying defective parts, a smart
The threshold.T. basically sets a boundaryvision system can be used to ensure that the
between pixels that are considered dark. i.e. l(m.n)template is placed in the proper orientation before
The global characteristics of the image derivedthe mold halves are closed. A schematic of how
from the histogram are used to modify individualthis can be done automatically is illustrated in
pixel values. Contrasting in point operations isFigure 3.To test it, a prototype was developed
usually achieved by simple scaling. In globalwith a DVT(TM) series 600 camera.18 The
operations, the approach is slightly different.Acamera was set up to capture the image as soon
technique known as histogram equalixation is usedas the template was placed in the mold half. Next,
to redistribute pixel values in order to produce aa number of algorithms (or tools) were used to
uniform histogram. In an image with m rows andcheck whether the print orientation was
n columns, and with a bit resolution of r. an idealcorrect.Two linear feature count tools were
histogram would be uniform with (m x n /2^supemployed. One was set at the top of the left
r^) pixels at each gray level.edge of the print and the other at the bottom
The spatial distributions of the pixels are usuallyleft. The lower tool was set to identify existence
changed to deliberately achieve a desired effect.of a line (dark feature with a specified minimum
Examples of geometric operations includethickness in pixels in this case) and the upper one
magnification of images, rotations andset not to identify any dark or bright features.
transformations. In general, these operationsUsing Framework(TM) software,18 it is fairly easy
involve mapping functions which would transformto apply and set these tools to perform the
a set of pixels at a location (x,y) to anotherrequired inspection without having to carry out
location (x',y').elaborate image processing and analysis.The result
Frame-based operations basically utilize more thanof each feature count was then digitally sent to
one image to perform or achieve a desiredthe camera I/O board as "Pass" or "Fail." Using the
effect.17'18 An example of such an operationsoftware, one can toggle through the digital I/O
commonly used in inspections is a point-by-pointsettings to configure this.The camera board's
comparison or subtraction of one pixel fromsignal was then sent to a programmable logic
another. A newly constructed image can then becontroller's (PLC) input. If the template was
passed as good or bad, depending on how itinserted wrongly, the PLC was programmed to
compares with the original or some reference setset off an audible alarm (buzzer) and turn on a
of pixels. Another algorithm that may be used iswarning light. Figure 4 is an illustration of the
one that compares distances between similarapplication of the linear feature count tools used
features.This algorithm, known as templateto perform this inspection.
matching, uses a known image's data as a trainingDuring the setting up of this test, the feature
set.The data will typically consist of distancescount tools were tested severally (at least ten
between features as vectors, and/or theirtimes) under fixed lighting and optical conditions.
similarities. 17An unknown image vector data isThis was used to determine the tolerance levels
compared to that of the training set. A thresholdfor the feature sizes. In a real-life application, the
is set to define level of success for which thenumber of tests would have to he increased
unknown image compares with the trained data.because of possibility of noise interference such
In this paper, template matching was used toas varying lighting conditions with time, or other
identify print quality on plastics. For examplesources such as electrical signals. With well-set
casting mould,mold making,plastic injection moldtolerance levels on minimum and/or maximum
etc.feature sizes, it is possible to achieve 100%
In order to obtain prints on a plastic molding, mostefficiencies in the inspection processes.