ProInspect Manual 2.9 en
ProInspect Manual 2.9 en
ProInspect Manual 2.9 en
User Manual
Version 2.9
1. Preface ......................................................................................................1
2. Starting and halting the system ..................................................................1
3. Using ProInspect........................................................................................2
4. Recipes .....................................................................................................9
4.1 Recipe settings ................................................................................... 10
4.2 Training .............................................................................................. 11
4.3 Calibration .......................................................................................... 12
4.4 Saving and retrieving recipes .............................................................. 13
5. Creating a recipe (tutorial)........................................................................ 14
6. Vision tool guide....................................................................................... 18
6.1 Search................................................................................................ 19
6.2 Edge tool ............................................................................................ 22
6.3 Caliper................................................................................................ 26
6.4 PatMax............................................................................................... 28
6.5 PatInspect .......................................................................................... 40
6.6 Blob tool ............................................................................................. 45
7. Other tools ............................................................................................... 51
7.1 Fitting tools ......................................................................................... 51
7.2 Distance tools..................................................................................... 52
8. Software Installation................................................................................. 53
1. Preface
ProInspect is a configurable inspection and robot guidance system. It can be
easily tailored for a specific inspection or guidance task through its intuitive
user interface.
This manual contains information about using the ProInspect Vision System. It
includes information on the following topics:
- Vision Tools
- Creating recipes
- Installation
- Interfacing ProInspect
The manual assumes the reader to have a basic knowledge of the Microsoft
Windows ? operating system.
In order to switch off the system, the normal shutdown sequence of Microsoft
Windows must be carried out. The sequence can be started by closing the
ProInspect application and confirming that you want to switch off the system at
the exit dialog.
Important Note: powering off the system without the correct shut down
sequence could result in a damaged file storage system.
Your unit may be equipped with a uninterruptible power system (UPS). In this
case the shutdown operation is executed automatically and the system can be
power off directly.
PROInspect 2
3. Using ProInspect
Recipe selection
Recipe control
Pass/Fail status
Access levels
In order to simplify and avoid unwanted access to setup operations ProInspect
provides three levels of access as depicted in the following table.
Level Description
Operator Operator level only allow to alter the
display mode, Start and Stop the
Inspection and change the active recipe
Engineer Engineer level allow the user to train and
change settings such as sensitivity to
defects.
You can modify the access level by clicking the key icon in the bottom bar or by
selecting Access Level from the File menu.
The system shows a dialog with the three options. You should select the
desired access level, enter a password if required and confirm with the OK
button.
PROInspect 3
Note: a password can be required in your particular installation for the Installer
and Engineer level.
This manual describes the complete set of operations available at the installer
level.
Inspection operations
In normal operations ProInspect is triggered by an external interface to carry out
the measurements and inspection tasks defined by the active inspection recipe.
? PC parallel port
? Serial port
? Ethernet
Other interfaces might be supported for your particular installation. Please refer
to the appendices of this manual for details of your specific interface.
After the inspection is carried out the results are given back through the
selected interface and shown on the system display.
The Inspection can be disabled and the system put in a special setup mode.
This mode is provided as some configuration and setup tasks cannot be carried
out while the inspection is running.
Examples of operations that can only be carried out in setup mode include:
Exit button
The exit button allows to close ProInspect or shut down the system. Upon
clicking the exit button a dialog is shown to confirm the desired operation.
Display Mode
ProInspect provides several indications of the inspection results. The results are
displayed as a color overlay on the inspected image and individual
measurements are shown in the result table. In addition the Pass/Fail decision
is indicated in the status area.
The display mode for the graphics overlay and the result table id selected by
pressing one of the buttons of the display control as depicted by the following
table.
Pass/Fail display
The Pass/Fail decision is shown in the status area. This indication is always
updated with the last inspection regardless of the setting of the display mode.
The green/red square boxes provide an hint on which view caused the reject.
Recipe selection
The recipe selection lets you select the active recipe from the list of recipes that
were saved on the disk.
? Recipe: the actual recipe (associated to a file with the same name in
the PC disk).
? Type: an optional type name that is associated to a Folder in the
PC file system.
The Type is merely a grouping of recipes that helps organizing recipes and
maintaining an acceptable length for the recipe list.
Recipe control
A recipe is the definition of the guidance or inspection task. A recipe consists in
a collection of Views and Objects.
The recipe control shows a list of the views in the recipe. The view can be
opened to display the hierarchy of objects associated to that particular view.
PROInspect 6
Selecting objects
One of the purpose of the recipe control is to select an item of the recipe. You
select an object by clicking its icon. A selection has several effects:
? The image associated with the view that contains the selected item is
shown in the image display area.
? The results of the objects associated with the current selection are
shown in the result table.
Result table
Results for the selected objects are displayed in the result table. For each
object the name, the fail/pass status and specific measurement for the type of
object are shown as depicted by the above illustration.
Statistics
ProInspect can provide the following inspection statistics:
Acquiring images
You can manually acquire an image for test purposes by pressing the acquire
button. If the selected view is associated to a camera that requires a “fast
trigger”the acquisiton will not take place until the trigger is received. During this
period the button will remain pressed. This operation can be aborted by
pressing the button a second time.
You can even display a live image by selecting the Live button. Live will carry on
until the button is pressed a second time.
Note: several operations cannot be carried out while live display is on. Their
controls, buttons or menus, will be disabled until live video is switched off.
Training
Training has two purposes:
? It defines the regions within the image were the analysis takes place.
? It builds reference models that will be used at run time
Training involves selecting the relevant regions by dragging a set of cursors
over the image of the part to be inspected.
You start training by clicking the Train button. Once all the regions are correctly
positioned you end training by clicking it another time
The Golden Image
Training associates positions, sizes and shapes of a set of regions with a
reference image, the “Golden Image”. This image is saved with the models in
the recipe file and retrieved each time a training session is started.
At times you might need to update the reference image for adjustments of the
camera, lighting or for part changes. In order to accomplish that you simply
need to click the Acquire button while training.
PROInspect 8
Testing
You can test objects of the recipe by clicking the Test button. You test either an
entire view or individual objects depending upon the current selection of the
recipe control. The test is carried out with the current image (shown in the
image area) . Prior testing you have the option of acquiring a new image or
retrieving an image from the disk ( Load Image from the Image menu).
The test results are displayed as graphics overlay and shown in the result
table.
Statistical Sampling
You start sampling by clicking the Sample button. Sampling is carried out for the
selected view only. Sampling is completed when the programmed number of
images are measured. You can abort sampling by clicking another time the
sample button.
4. Recipes
A ProInspect recipe is the definition of the guidance or inspection task. A recipe
is made of the entities described in the following section.
Views
Each camera connected to the system provides a view of a part to be located or
inspected. They can be multiple views of the same part or views of different
parts to be inspected simultaneously such as for a system with multiple
inspection stations.
Sites
A Site is a container for vision tools. All the tools in a site may depend upon the
position of the site. Their search areas or region of interest are relocated
according to the result (x, y, angle) of the locating tool that provides the position
of the site. There can be sites without any registration. In this case the site is
merely a grouping of tools.
Vision Tools
Vision tools provide a pass/fail decision or some kind of result to other tools.
Tools can be combined in a recipe to obtain powerful inspection capabilities.
For example the Search tool could find accurately the position of a part before
the Caliper tool gauges a feature.
Object settings
You can change objects properties through their configuration dialogs
accessible by double clicking their icon in the recipe control.
Vision tool properties are described in detail for each tool in chapters 4, 5, 6.
Other object properties
Id’s
Each object in the recipe possess an unique Id that is shown in its dialog.
Enable/Disable status
The execution of each object can be enabled or disabled through the Enable
checkbox of its dialog.
Camera port (for views)
The view object allows to select the camera port. The current ProInspect
version supports up to 4 cameras. More camera properties can be set with the
camera properties dialog.
4.2 Training
Training establishes the region of interest of inspection tools. Furthermore it
acquires image templates for tools that require that. Training is needed after a
tool has been inserted in the recipe.
Start Training
Press the Train button or select the Inspect – Train menu to start training.
Select a site
Training is carried out for all the tools of the site selected with the recipe control.
If a particular site is selected, you can manipulate only the tools located in that
site. Tools that belongs to a space can be manipulated by selecting their space.
Golden Image
Train always recalls the “golden image”of the inspected part. The golden image
is stored the first time a recipe is trained. It can be changed simply by acquiring
or loading a disk image in a train session.
Tool Windows
During training you will relocate and resize the windows that appear as color
overlay on the image with the mouse pointer. The active window is shown in
yellow with pink handles. In order to resize a window you should drag an
handle. Drag the yellow lines to relocate.
Once you are satisfied with the windows positions, press again the train button
to conclude training.
PROInspect 12
4.3 Calibration
Calibration is the process with which the system establishes the relationship
between the camera space and a known space. Calibrating involves using
known data such as the coordinates of a set of points and measuring them in
the image space. Because ProInspect uses error minimizing resolution
techniques, the RMS error (root mean squared error) is provided as estimate of
the calibration quality.
In designing the calibration experiment, care should be taken to avoid
redundancy in the data that may lead to mathematical problems. A typical
situation of redundancy is when the calibration points are aligned. Good point
configurations are shown in the following figure.
Point calibration
Point calibration works with a small number of points. The acual number of
points is established at design time. The World coordinates have to be entered
in a table. The Vision coordinates are measured by dragging a set of cursors
over the calibration targets.
To start the calibration select a tool in the space you want to calibrate in the
recipe tree and activate Vision - Calibrate menu command.
The system shows a set of cursors, one for each calibration point. You should
drag the cursors over the targets as accurately as possible. The system shows
the camera coordinates in the Pixel X , Pixel Y Columns of the table in the
right side of the screen. Enter the corresponding X,Y coordinates and press
Done to finish.
Robot calibration
Robot calibration works with a single target that is placed in a set of known
position by a manipulator. Prior calibrating a locating tool must be established
and trained to locate the target. Robot calibration is done by moving the target
to each position. The Robot will issue a specific “Add Calibration Point”
command providing the robot coordinates for that point. ProInspect measures
the pixel coordinates of the target and adds them to a calibration table. After
having completed the process for the desired number of points, the robot issues
the “Calibration Solve” command.
This type of calibration offers several significant advantages. The calibration
operation is carried out automatically without the need of manual
measurements. This calibration maps pixel directly into the robot or machine
reference system.
Grid calibration
Grid calibration is done by showing a known grid of dots to the system. The
system measures the position of each dot and computes the calibration map. A
significant advantage of this type of calibration is that the large number of dots
enables a better error minimizing mathematics. With this solution it is possible
to significantly reduce errors such as the geometrical optical aberration, a
particularly significan error with some type of lenses.
Our sample project consists in locating the position and orientation of a pipe
fitting on a conveyor and measure a the size one end to check that the part is
the correct one.
Creating a blank recipe
We start by creating a blank recipe by selecting New . from the File menu.
After dropping an object one has the option of giving it a name. We called our
view “ Conveyor View”. Names can be changed at any time by selecting the
object, clicking its name and typing in a new name.
Object properties can be accessed also outside the design dialog by double
clocking their icons in the recipe control.
We must now test image acquisition. We close the design dialog and clock the
Live button. We can now adjust the camera and lighting.
Objects in the recipe have a certain hierarchy. Vision tools such as PatMax are
always contained in views.
We will now prepare for training. We close the design dialog and press the Train
button.
A rectangular cursor is shown in the image area. Once we click near the edges
of the rectangle, small squares at each corner appear. Dragging the corners
has the effect of resizing the rectangle while dragging the edges moves it.
The small cross in the center of the rectangle is a special point called “ origin”
that will be returned as search result. We must rather accurately position the
origin.
PROInspect 16
In order to adjust its position we zoom in by clocking the right mouse button and
selecting “Zoom +”.
Once we are satisfied by the position of the model area we press the Train
button again to end training.
Testing PatMax
We can now test the PatMax search by moving the part under the camera,
acquiring an image and executing the test.
ProInspect finds the part quite accurately. Let move on to the gauging task. We
must measure one end of the fitting .
The caliper is a perfect tool for this task. The caliper must be applied with a
consistent position and orientation relative to the position of the part.
Adding a site
Sites are made for this purpose. Sites get a displacement from the associated
set of locating tools. This displacement is applied to the execution of the tools
contained in the site.
A site is added to the recipe just like any other object by dragging an icon from
the left pane to the recipe view.
The Pre-alignment is a container for the tool that provides the position to the
site.
In order to establish PatMax as the position reference for the site we just drop
the PatMax icon into the Pre-alignment.
Note that PatMax was dragged from the recipe view and not from the left pane.
The instance of PatMax here is merely a reference to an object that exists
already in the recipe.
PROInspect 17
The caliper like most tools require training. We close the design dialog and start
training. We place the caliper region perpendicularly to fitting end that we must
measure. The caliper detects the size by locating a pair of edges and
measuring their distance,.
We finally have to set some caliper parameters. We do that with the Caliper
dialog:
? nominal size = expected size
? size tolerances
? edge polarities light to dark, dark to light.
After testing it we can now save the recipe. We select Save as from the File
menu.
PROInspect 18
Vision tools are the basis of the powerful inspection capabilities of ProInspect.
This chapter provide a basic description of each tool and depicts the available
settings. It includes information on the following tools:
? Blob tool: a tool that finds and counts objects or defects with a gray
levels that differ from the background.
6.1 Search
The purpose of Search is to locate and measure the quality of one or more
previously trained features in an image.
Search locates features by finding the area of the image to which the model is
most similar.
Figure 6-1 shows a model and an image, and the areas of the image that are
most similar to the model. An image and model similar to those shown in Figure
1 might be used to search for a single instance of a feature such as a fiducial
mark on a printed circuit board.
Model
Candidates
Best Match
Search Score
Search finds the location of a pattern in a search image based on a model
image of that pattern. In addition to returning the location of the pattern in the
search image, Search also indicates how closely the pattern in the search
image matches the pattern in the model image by returning a score. The score
indicates how close a match exists between the trained image and the image
whose location was returned. Scores range from 0.0, indicating no similarity
between the model and the feature, to 1.0, indicating a perfect match.
Origin point
The location of the pattern is reported for a special point called “origin” . The
origin is normally an arbitrary point of the pattern chosen at train time.
Synthetic models
In alternative to models trained from actual images synthetic models are
generated by assuming a certain shape of the pattern to be located such as a
circle or an annulus. Synthetic models eliminate the need of manual training
and provide the additional advantage of having a non arbitrary origin point. For
example the origin of a circle is established in the center.
PROInspect 20
? Search rect Standard search tool with rectangular model area and
(standard): rectangular search area.
? Search circle Search tool with circular model area and rectangular
search area.
? Search annulus Search tool with annular model area and rectangular
search area.
? Search circle Search tool with circular synthetic model and rectangular
synth. search area.
Search Settings
Note: the model origin is an arbitrary point of the model region. The result of the
search is the position of this special point in the run time image.
Search range
X, Y The X, Y, in pixels, defines the area around the nominal
Search range position of the template in which the system performs the
search.
Tolerances
X, Y The tolerances for the search result. The tool fails if the
Tolerances position is found outside these tolerances.
Skip results on An option to avoid considering results that are found along
edges the edges of the search areas as these results are often
unreliable.
PROInspect 21
Number of results
The maximum number of results to search and report..
Search results
Score Match quality index. A value from 0 to 1 indicating the level
of conformity between the model and the pattern found.
The Edge tool differs from other vision tools in that it requires that you know the
approximate location and characteristics of the feature or edges you want to
measure or locate.
The Edge tool is typically used to develop detailed information about the precise
locations of features within an object. It is not appropriate for developing
information about the shape of objects or features.
Projections
The first step in using the Edge tool is to specify a projection region within the
image to which you want to apply the tool. The Edge tool depends on a carefully
defined projection region to isolate just the edge information from a small
section of the image.
The projection operation sums all the information in the projection region,
accentuating the strength of edges that lie parallel to the projection rays and
reducing the effects of noise.
Figure 6-3 shows how a projection can accentuate the edge information in a
two-dimensional image. Notice how the strength of the edge is stronger in the
projected image than in the initial image.
Projection
region
Projection
direction
Edges of
interest
Projected image
peaks in the filtered image to determine the location of edges in the original
image. In addition to producing an image with peaks that correspond to edges
in the input image, image filtering also removes noise and spurious edges from
the input image.
Figure 6-5 illustrates an example where the image contains two true edges
along with spurious edges caused by variations in pixel values around the edge.
When a filter with a size of 1 is applied to the image, both the edges of interest
and spurious edges appear as peaks in the filtered projection image.
Filtered image
(filter size = 1)
Figure 6-7 shows the effect of applying a filter with a width of 2. The peaks that
correspond to the edges of interest are broader, and most of the spurious peaks
from Figure 4 are no longer present in the filtered projection image.
Projected image
Filtered image
(filter size = 2)
PROInspect 24
Edge selection
Once it has located the edges in the original image, the Edge tool computes a
score for each potential edge pattern in the image. The score for each edge
pattern in the image is computed based on a set of selected criteria.
You control the method that the Edge tool uses to score edge pattern
candidates by performing the following steps:
The tool computes a separate value for each attribute for each edge candidate
based on the scoring method that you supply, then computes an overall score
for each edge pattern candidate by combining the individual scores. It finally
selects the edges with the highest score.
Tolerances
Position offset The tolerances offset of the edge position found relative to
the middle point of the search region established at train
time.
Accept score The score acceptance level. The score indicates the
conformity of the edge with the specified criteria’s. Refer to
the “Edge selection” section of this chapter.
Edge detection
Edge polarity The expected edge polarity. Polarity can be set to one of the
following values:
? Light to dark.
? Dark to light
? Don’t care
Note: The edge tool scan the projection from left to right.The left side is defined
at angle 0. The left side can be inverted by rotating the edge tool region. The
right is indicated by the rotating handle of the cursor.
Right side
Note: The absolute value of the score for a particular criterion depends on the
its expected value.
? contrast = 100, exp. contrast = 100, weight = 1 score is 1.0 (perfect edge)
? contrast = 100, expected contrast = 200, weight = 1 score is 0.5
Expected values for contrast are set explicitly in the dialog. The expected value
for the position depends on the search region length and is set according to the
type of position criterion.
6.3 Caliper
The Caliper tool uses the same techniques described for the edge tool applied
to edge pairs. The caliper measures the location and spacing of pairs of edges
in images.
The caliper tool differs from the edge tool in that it locates a pair of edges
instead of a single edge. By locating two edges it reports as additional result the
distance between them.
The following tables depict the settings and outputs of the caliper tool. Most
items are identical to the edge tool.
Edge selection - Scoring
Size Stronger Stronger edges get higher scores.
Caliper results
Score Match quality index. A value from 0 to 1 indicating the level
of conformity of the edge with the specified criteria’s
6.4 PatMax
Like other pattern-location technologies, PatMax trains a pattern, then locates
one or more instances of that pattern in one or more search images.
PatMax offers three key features that distinguish it from other pattern-location
technologies available in machine vision:
Figure 6-10 shows an image, the corresponding pattern, and the features that
make up the pattern.
Note The pattern is made up of both the features and the spatial relationship
among the features. Image Pattern Features
PatMax also computes a score between 0.0 and 1.0 that provides an indication
of how closely the pattern in the search image matches the pattern from the
training image after accounting for the transformation that the pattern has
undergone.
PatMax Patterns
When you train a PatMax pattern from an image, PatMax constructs an internal
representation of the object. The pattern is a geometric representation of the
shapes in the training image. The individual shapes, called features, are made
up of continuous boundaries between regions of dissimilar pixels in the image.
Pattern Features
A PatMax pattern is a collection of features. When you train a pattern from a
training image, PatMax isolates all of the features in the image and uses them
to train the pattern.
A feature boundary point has a location and an angle along with links to its
neighboring boundary points. The location of a feature boundary point is a point
through which the feature boundary passes. The angle of a feature boundary
point is the angle between the image coordinate system x-axis and a line drawn
through the feature boundary point perpendicular to the feature boundary and in
the dark-to-light direction.
PROInspect 30
PatMax uses large features to locate a pattern in a search image quickly and
small features to determine a pattern’s location precisely.
Image Features
Fig. 6-12 Large features used for coarse location and small features for
fine location
PROInspect 31
The features that PatMax detects in an image are controlled by the granularity
used by the PatMax when it analyzes the image. To detect only the large
features in an image, PatMax uses a larger granularity setting. To detect the
small features in an image, PatMax uses a smaller granularity.
Granularity is expressed as the radius of interest, in pixels, within which
features are detected. Figure 6-13 illustrates two important characteristics of
pattern granularity.
? Large features such as the outline of the diskette are detected at both
small and large granularity settings.
? Smaller features are present or absent from the image depending on the
granularity setting.
At the smallest pattern granularity, the trained pattern includes one or two
features for each letter on the diskette label. As the pattern granularity
increases, the number of features decreases.
In addition to affecting the features that are trained as part of the pattern,
pattern granularity also affects the spacing of boundary points along a feature
boundary. In general, the spacing of feature boundary points is approximately
equal to the pattern granularity.
Note PatMax trains the pattern using a range of granularities, not just the
coarse and fine granularity limits. The coarse and fine limits are the largest and
smallest granularities that PatMax uses.
Pattern Polarity
Each of the boundary points that describes a pattern feature has a polarity. The
polarity of a boundary point indicates whether the boundary can be
characterized as light-to-dark or dark-to-light. You can configure PatMax to find
only objects in which every boundary point has the same polarity as the trained
pattern, or you can configure PatMax to find objects with mismatched polarity.
Ignoring pattern polarity increases the variety of patterns that PatMax finds.
Search Space
When you search for a PatMax pattern in the search image, you define the
search space that PatMax uses. The search space is determined by the
degrees of freedom you enable, and the range of values to consider within each
degree of freedom.
When you run PatMax, it returns a transformation that describes how the
trained pattern maps into the found instance. You can use the information in this
transformation in two ways:
• As a transformation object that you can use to convert any location from the
trained pattern to the corresponding location in the search image
• As individual values for the ordinary degrees of freedom (the location of the
pattern origin) and individual values for each of the generalized degrees of
freedom that you have enabled
When you run PatMax, you can obtain individual results for each enabled
degree of freedom, or you can obtain a single transformation object that you
can use to transform points between the client coordinate system of the training
image (translated by any nonzero pattern origin) and the client coordinate
system of the search image.
PROInspect 33
Score
For each instance of the trained pattern that PatMax finds in the search image,
it computes a score value between 0.0 and 1.0. The score an instance receives
indicates how closely it matches the trained pattern. A score of 1.0 indicates a
perfect match; a score of 0.0 indicates that the pattern does not match at all.
When you specify the Patmax algorithm, PatMax scores instances on both the
closeness of pattern fit (the degree to which the shape of the features in the
search image conforms to the shape of the features in the trained pattern) and
the presence of clutter (extraneous features). When you specify the Patquick
algorithm, PatMax scores instances on pattern fit only.
In considering the fit, PatMax considers the shape of the pattern. Differences in
brightness or contrast (as long as the polarity is the same) are ignored. (You
can specify that PatMax ignore polarity changes in addition to brightness and
contrast changes.)
Contrast
In addition to the overall score, PatMax also returns the image contrast of each
instance of the pattern it finds in a search image. The contrast is the average
difference in grey-level values for all of the boundary points that PatMax
matched between the trained pattern and the pattern instance in the search
image.
Since PatMax computes the score for a pattern based on the shape of the
pattern, the contrast value and score value are generally independent. You can
use the contrast value to get additional information about the object.
You can specify a contrast threshold for PatMax searches. If you specify a
contrast threshold, only pattern instances where the average difference in grey-
level values for all of the boundary points exceeds the contrast threshold are
considered by PatMax.
PROInspect 34
Fit Error
The fit error is a measure of the variance between the shape of the trained
pattern and the shape of the pattern instance found in the search image.
The fit error is computed by taking the square root of the sum of the weighted
average distances between each boundary point in the pattern and the
corresponding boundary point in the pattern instance in the search image. If the
pattern instance in the search image is a perfect fit for the trained pattern, the fit
error is 0.0. You can use the fit error to assess the degree to which the shape of
a pattern instance matches the shape of the trained pattern.
Coverage Score
The coverage score is a measure of the extent to which all parts of the trained
pattern are also present in the search image.
The coverage score is computed by determining the proportion of the trained
pattern that is found in the search image. If all of the trained pattern is also
present in the search image, the coverage score is 1.0. Lower coverage scores
indicate that less of the pattern is present.
You can use the coverage score to detect missing or occluded features.
Clutter Score
The clutter score is a measure of the extent to which the found object contains
features that are not present in the trained pattern.
The clutter score is the proportion of extraneous features present in the found
object relative to the number of features in the trained pattern. A clutter score of
0.0 indicates that the found instance contains no extraneous features. A clutter
score of 1.0 indicates that for every feature in the trained pattern there is an
additional extraneous feature in the found pattern instance. The clutter score
can exceed 1.0.
When PatMax computes the clutter score, it considers all features within the
area in the search image that corresponds to the entire image area used to train
the pattern.
Degrees of Freedom
When you perform a pattern search using PatMax, for each generalized degree
of freedom (a degree of freedom other than x-translation or y-translation), you
must specify either
• That the degree of freedom is enabled or disabled
• If the degree of freedom is enabled you must specify the permitted range of
values for that degree of freedom. PatMax will find instances of the pattern that
have values for the degree of freedom within the specified zone, and PatMax
will compute and report a value for the degree of freedom.
Finally, PatMax might return some model instances that are slightly outside the
zone you specify. For example, if you specify a scale between 0.95 and 1.05,
PatMax might return results with scale values of 1.09 or 0.91.
.
PROInspect 35
Elasticity
By default, PatMax requires that each boundary point in the instance of a
pattern found in a search image closely correspond to a boundary point in the
trained pattern. PatMax can match and identify any change that can be
described by a linear geometric transformation (assuming you specify the
appropriate degrees of freedom and zones).
When patterns experience nonlinear geometric changes, PatMax can fail to find
them, or it can return a low score or inaccurate location information.
You can specify the degree to which you will allow PatMax to tolerate these
kinds of elasticity by specifying an elasticity value. You specify the elasticity
value in pixels.
You should keep the following points in mind when specifying a nonzero
elasticity value:
Using PatMax
This section describes how to use PatMax.
Training Image
When you train a PatMax pattern, PatMax uses all of the information in the
pattern training image you supply. You should avoid including features in the
training image which will not be present in the search image.
In order to train a pattern from a pattern training image, the image must contain
distinguishable features. For best results, you should observe the following
guidelines when selecting a training image:
PatMax can return diagnostic information at training time that indicates whether
a trained pattern is potentially degenerate in a particular degree of freedom.
• If the pattern training window is close to the edge of the root image, feature
boundary points that are closer to the edge of the root image than the coarse
granularity limit may not be detected.
If the pattern training window is not close to the edge of the root image then it is
guaranteed that every feature inside the window is detected, regardless of the
coarse granularity setting.
• PatMax can detect features that are outside of the pattern training image if
those features are within the coarse granularity limit of the edge of the pattern
training window and if they are not within the coarse granularity limit of the edge
of the root image.
PROInspect 37
Note: the model origin is an arbitrary point of the model region. The result of the
search is the position of this special point in the run time image.
Search range
Search range Specifies one of the possible settings for defining the
mode search area.
? Entire image
? Centered Search area centered
around the position of the
model in the trained image.
The size of the search area
Tolerances
Position Offset The tolerances offset of the edge position found relative to
the model origin established at train time.
Number of results
The maximum number of results to search and report..
PROInspect 38
Alignment – Algorithm
Alignment Specifies what algorithm will be used for searching.
PatMax results
Score Match quality index. A value from 0 to 1 indicating the
global level of conformity between the model and the
pattern found.
Fit (error) The fit error is a measure of the variance between the
shape of the trained pattern and the shape of the pattern
instance found in the search image.
Coverage The coverage score is a measure of the extent to which all
parts of the trained pattern are also present in the search
image
6.5 PatInspect
The purpose of PatInspect is to detect defects. PatInspect creates the template
image of an object from a sample of training images and then compares run-
time images of the object against the template image. For PatInspect, a defect
is any change in the run-time image that is beyond the expected variation in the
training sample. A defect can be an erroneous or unwanted mark on an object,
an incorrectly shaped feature, or the absence of a feature.
Training
During this phase you supply PatInspect with a sample of acceptable instances
of the image that you want to inspect at run-time. For intensity difference and
blank scene inspection the output of this phase consists of a template image, a
standard deviation image and a threshold image. For feature difference
inspection the output is just a template image (see Figure 6-16).
Run-time Inspection
During run-time inspection PatInspect uses the information acquired during
training to inspect a run-time image (see Figure 6-17).
1. PatMax locates the alignment region in the run-time image unless you
provide an external pose.
Defects are distinguished in “major” and “minor” defects based on their size.
Major defects have a size above a major limit. Minor defects have a size below
the major limit and above a minor limit. Defects below the minor limit are
neglected.
PatInspect settings
PatInspect has two type of settings.
? Mean and std Derive the pixel map from the mean and
deviation standard deviation of the pixel grey-scale
values calculated during training.
PatInspect results
PatInspects reports alignment results identical to PatMax.
In addition the system reports the count and the area of the larger defect found.
PROInspect 45
The blob tool is used to detect and measure two-dimensional shapes (blobs)
within images.
Blob analysis can provide your application with information about the number,
location, shape, and orientation of blobs within an image.
Image Segmentation
Since blob analysis is fundamentally a process of analyzing the shape of a
closed object, before blob analysis can be performed on an image, the image
must be segmented into those pixels that make up the blob being analyzed, and
those pixels that are part of the background.
In general, all images that are used for blob analysis start out as grey-scale
images of scenes. While it might be easy for a human observer to identify blobs
or objects within the scene, before blob analysis can analyze the image, each
pixel in the image must be assigned as an object pixel or a background pixel.
Typically object pixels are assigned a value of 1 while background pixels are
assigned a value of 0.
Several techniques can be used to segment images into object pixels and
background pixels. The following sections describe these techniques.
Binary Thresholding
The simplest technique for segmenting an image is to pick a threshold pixel
value. All pixels with grey-scale values below the threshold are assigned as
object pixels, while all pixels with values above the threshold are assigned as
background pixels. This technique is called binary thresholding or hard
thresholding.
Figure 6-19 shows an idealized scene, the application of a hard threshold, and
the resulting segmentation of the image into object and background pixels. In
the example below, a threshold value of 150 was used. All pixels with values
greater than or equal to 150 are treated as background; all pixels with values
less than 150 are treated as object.
Regional thresholding
Binary thresholding, although a simple and fast method has several drawbacks.
Binary threshold works well with high contrast blobs and images with a
homogeneous background level.
Area
The area of a blob is defined as the sum of the weighted pixel values for every
nonzero pixel in the blob. If a hard binary threshold was applied to the image to
segment it, then the area is simply the number of nonzero pixels in the blob. If
grey-scale analysis is being performed, then the area is the sum of the pixel
weights.
Perimeter
The perimeter of a blob is the length of the outside edge of the blob. A blob’s
perimeter is computed by counting the number of pixel edges between pixels
with nonzero values and pixels with values of 0.
Because computing the perimeter in this way tends to produce a perimeter that
is lager than the actual blob perimeter, a correction factor is applied to the
perimeter.
Center of Mass
The center of mass of a blob represents the blob’s balance point. If a sheet of a
uniform material were cut out in the shape of the blob, the point upon which the
blob would balance is the center of mass.
Geometric Extents
The geometric extents of a blob are the distances between the blob’s center of
mass and the four sides of a rectangle that is oriented to the blob’s principal
axes and that completely encloses all the blob’s pixels.
Defects are distinguished in “major” and “minor” defects based on their size.
Major defects have a size above a major limit. Minor defects have a size below
the major limit and above a minor limit. Defects below the minor limit are
neglected.
Blob settings
Measure mode
Position offset Limit for the position offset of the blob fount relative to the train
time situation.
Rotation Limit for the rotation of the blob relative to the train time situation.
Perimeter Limit for the perimeter size relative to a specified nominal value.
Area Limit for the blob area relative to a specified nominal value.
Axis tolerances Tolerances for horizontal (H) and vertical (V) axis.
(H, V)
Threshold page
The threshold page contains settings that influence the segmentation process.
The threshold page includes an image panel showing the result of the
segmentation. The graphics is updated interactively at any parameter change.
The image panel shows a graphics that change with the setting of an option
mode with the following possible choices:
? Defects – bounding boxes
? Blobs – segmented pixels in red
? Threshold – mapped image – red for lighter pixels – blue for darker
pixels
PROInspect 50
Sensitivity
Sensitivity Black Only “black” pixels, darker than the
mode background are segmented
Min area Blob size limit. Blobs smaller than this limit are neglected
Blob results
Inspect mode
? Number of blobs
? Max blob size
Measure mode
The following measurement are reported for the largest blob
? Perimeter
? Area
? Shape factor (Area/perimeter ratio)
? H and V axis size
? Position (x, y of the center of mass)
? Offset (x, y relative to the model position)
? Angle (of major inertia axes)
PROInspect 51
7. Other tools
You use the Fitting tool to locate lines or circles based on individual point
locations that you determine using other vision tools.
Fitting a Line
The Line tool considers the best fit line by computing the sum of the squares of
the minimum distance from each point to the line. The best fit line is the single
line that has the lowest value for this computation.
The result of the Line tool is the center position and the orientation of the line.
Fitting a Circle
The Circle tool lets you fit a set of points to a circle by minimizing the absolute
value of the signed square distance error. This method computes the radius of
the fitted circle.
The result of the circle tool is the center and the size (diameter) of the circle.
RMS Error
The Fitting tools provide with the RMS (root mean square) error an indication
about the quality of the fitting.
The RMS error is the square sum of the distances between the actual positions
of the points and their predicted values, divided by the number of points.
PROInspect 52
The Point Distance tool takes two locating tools as input and returns the
distance between them.
The Line distance tool takes a line and a point locating tool as input and returns
the orthogonal distance.
PROInspect 53
8. Software Installation
The ProInspect software is likely to be already installed in your system. This
section provides instructions in case you should install the ProInspect software
from scratch using the installation CD provided with your system.
The PC must be prepared with the following hardware and software before
installing ProInspect:
If your system does not already have Widows Installer the Instwmsi.exe install
program is provided in the principal CD folder.