VP04 1 SearchToolStrategies
VP04 1 SearchToolStrategies
Session 4
Objectives
• The student will correctly:
Identify applications where PMAlign or SearchMax may be part of the
vision solution
Create and configure a PMAlign tool to find a pattern under various
run-time conditions
Evaluate parameter settings to determine which are needed for various
run-time conditions
Optimize execution time and accuracy
Understand parameters to search more successfully
Create and configure a SearchMax tool
Decide when to use PMAlign or SearchMax
Train and set run-time parameters
1
PMAlign Revisited
Pattern Polarity
By default, PatMax only
finds patterns with the same
polarity as the trained pattern.
Matching Mismatched
polarity polarity
2
Ignoring Pattern Polarity
Polarity is a hint to PatMax which can make a pattern less
ambiguous. You should use polarity unless the object is subject
to polarity changes. Notice the potentially ambiguous object
illustrated below.
EXPECTED
MATCH
INADVERTENT
MATCH
Repeating Patterns
• These can create a special challenge to PatMax
- Human eye has problems with repeating AND alignment
- PatMax MUST be selected as Algorithm
Train Runtime Pattern
Pattern found
3
Elasticity Shows Advanced Parameters
• Elasticity is an
Advanced Parameter
that can be valuable
in finding parts with
some geometric
change from the
originally trained
pattern
Elasticity
Elasticity, a train-time parameter, is
used to specify the degree to which
you will allow PatMax to tolerate
nonlinear geometric changes
Image
Elasticity is measured in pixels, Pattern
typically 0 to 8
4
Granularity
Granularity = 6
• Coarse granularity controls the
level of detail used by the PatQuick
algorithm.
• Fine granularity controls the level
of detail used by the PatMax
algorithm.
• By default, both are set to 0
allowing PatMax to automatically
determine good values.
Granularity = 1
9
5
Relationship Between Boundary Points
• In the end PatMax creates a compilation of vectors which
include boundary point information, direction (polarity), and a
relationship to one another.
11
• Contrast
- Greyscale difference between
edge and background
• Overlap
- Percentage of one part
covering another
12
6
Clutter
• The model consists of inter-related boundary points.
• Clutter is a term used to describe extra features present
and adjacent to the original boundary features of the
image. They were not trained as part of the original model.
13
Clutter in Score
• The Score using Clutter
parameter allows you to
factor or ignore clutter when
the score is calculated.
• If checked, score is lowered
based on the amount of
clutter.
• If unchecked, score is not
affected by the presence of Score: 68
clutter.
Score: 94
14
7
Contrast
• Contrast sets the minimum
contrast required in order to
consider a change in
grayscale a potential 92 62
boundary point.
5
15
16
8
Outside Region
• Outside Region allows a percentage of the model to be outside the
search region and still be found.
• Those missing boundary points outside the field of view are not counted
against the score.
17
PatMax Score
• Score ranges from 0 (no match) to 1.0 (perfect match)
• Brightness, Contrast, and Polarity do NOT affect scores. They
may only affect if a pattern is detected or not.
• Factors considered in scoring include:
• Degree of Pattern Shape Fit
• Fit within Degree of Freedom range
• Missing Features
• Extraneous Features (PatMax algorithm only)
18
9
Parameters & Execution Time
• The larger the Search “Volume”, the longer the execution time will be
– (width) x (height) x (angle zone) x (scale zone)
• Lowering accept threshold forces more exploration
• Larger number of results asked for makes execution time slightly longer
• Lower fine granularity limit increases time (more detail to resolve)
• Increasing the coarse granularity limit decreases time (but be sure
necessary features are being detected)
• Consider polarity to slightly increase speed
• Set a Contrast Threshold > 0.0 for faster execution
19
20
10
Guidelines for High Accuracy
• Object Appearance
– Objects must be consistent in relative geometry
– Objects must be consistent in appearance
– Object features should be sharply defined
21
22
11
SearchMax
SearchMax
• Specialized search tool that combines features from both
PMAlign and CNLSearch
– CNLSearch – normalized correlation to match features at runtime
– PMAlign – find instances at different rotations and scale
24
12
Differences
PatMax SearchMax
Color Image Must be transformed to Handles color images
grayscale
Outside Region Model can be outside ROI Part MUST be in ROI
Skewing Cannot handle skew Can find in skew range
Small Model The bigger the model, the Can handle small models
better (more info)
Noisy Background Very good at finding model Cannot handle background
noise very well
Open Shapes Not as reliable on open Can give more reliable results
shapes (like a corner)
Many DOFs Increase in tool time, but Tool time becomes extremely
good high
25
13
SearchMax Capabilities
• Intensity based alignment (intensity correlation)
– Grey Scale, RGB
• DOF
– Rotation 0-360 degrees, Scale 50-200%, Skew 0-30 degrees
• Accuracy
– Depends on image size but varies between a ¼ and a 1/10 of a pixel
• Benefits
– Can handle very small patterns (15x15 or smaller)
– Works on many images where PatMax has a hard time
• Blurry images
• Confusing or too many geometries created by noise
• Skewed images
27
SearchMax
Training similar to PatMax
except its modes.
28
14
Results
29
Summary
• PMAlign has powerful options like ignore polarity and fine
tuning granularity to solve the most challenging applications
• SearchMax is useful under certain types of applications such
as when models are too small to extract useful boundary
details
• SearchMax tracks color information as well as grayscale
30
15