le NES
"| ON
NEA NES NN NP M SUP NE "S4
w^ V4 e SU CU
- €
(D (A (A = (0 CD (A (A (9 (9 CD = md CI
correct edge became very weak in close proximity to
stronger edges that actually came into contact with
the edge of interest. Sometimes the search may follow
the wrong edge and not recover immediately, but
eventually the constraint that the search proceed
towards the goal point will be violated and the search
will eventually back up to a point where it can
proceed along the correct edge.
When searching for a roughly circular edge, VCM
makes use of two constraints. The first constraint is
that the search remain inside a ring. The other
constraint is that the distance from potential edge
points to the estimated center of the circle not vary
too much from the current average value for this
distance. In order to apply these two constraints the
algorithm must be supplied with a rough estimate of
where the circle’s center is. In the following
discussion, the distance from the ith edge point to the
estimated circle center will be referred to as rj. The
ring to which the edge search is confined is obtained
by calculating minimum and maximum allowable r
values based on the value for rg. This allows for the
fact that a circular edge may appear as an ellipse in
an image. Figure 6 illustrates this concept.
The “current average" value for "r" is calculated
according to the following formula.
& 1
n-
ES
i=0
n ;
Tavg ip
This equation is of the same form as the calculation
used to maintain dayg as part of the basic algorithm.
Therefore it can be updated using the same form of
recursive formulas. These calculations can also be
performed at the same time as the update calculations
for dayg are being made. When the search has to back
up, the effect of the removed pixel upon the value for
ravg must be undone in the same manner as is used
for dayg. At each potential edge point the value for rj
is calculated. If the difference between rj and rayg is
greater than a threshold value then the search will
back up. The application of this constraint helps to
prevent the search from leaving the circular edge by
ensuring that the r values do not change too quickly.
The r values are compared to the current average
value rather than the previous value because it was
found that better performance was achieved when
the average value is used (the average value
represents the recent trend rather than just an
isolated occurrence).
Starting Point
Ima X
Center
< Ip
Imin
7i
— :
10 — m Potential Edges
Figure 6: Circular Edge "Ring" Constraint
The edge following as described above is also used as
the main tool for reverse engineering applications.
Since the process is interactive, it can be applied to
parts which have no model or CAD data.
3.1.3. Edge Projection Using an Object Model
One of the main application areas for which VCM
was developed is that of part inspection. In most part
inspection applications, the part being inspected is
known. This fact can be exploited in order to greatly
simplify the edge extraction process. When a model
exists for the part and the system can easily locate the
part in three-dimensional space, then all edges of
interest can be projected onto the camera image plane
for any camera in the system.
Figure 7: Example of a sheet-metal part with reference points
(holes) and edges of interest (the square),the wire frame is
drawn with dark lines.
The basic technique is as follows (see figure 7). First
the part is located by finding and measuring the
position of the most prominent features on the part.
Features for locating the part should be chosen based
on the ability of the system to use very general
methods to find these features. Features like outside
edges or holes are ideal. In the current system, only
hole-type features have been used to locate parts.
These features are used to locate the part reference
frame with respect to the vision system reference
frame. The part reference frame is a reference frame
which can be thought of as being fixed to the part,
and moves when the part moves. The part model is
also described with respect to this fixed reference
frame. The expected position of any feature defined
by the model with respect to the vision system
coordinate system can thus be calculated once the
location of the part is known. Points in space can be
projected onto the camera image planes using the
system model. The expected location, in any image, of
any feature described by the model can thus be found.
An edge image can be created by projecting points
belonging to individual features on to the image and
connecting the resulting image points to form a
contour. Since actual parts being inspected will differ
slightly from their models, the use of this technique
produces only an estimate of what the edge image will
look like. It has been found in practice that this is
sufficient to locate and measure the real edge in the
image. One of the main advantages of this technique
is that it greatly simplifies the task of finding the
more difficult features. It does not matter if the
contrast of the feature with its surroundings is poor
or if noise is present. It also simplifies the task of
automating the measurement process. The model
provides all the information the system needs to find
all the features to be measured.
VCM accepts object models consisting of a file of
ordered edge points labelled according to the object
feature to which they belong. Other types of models
such as CAD models or models created from
measurements provided by other systems could be
incorporated by creating suitable files from the model
data and using the model building routine in the VCM.