0% found this document useful (0 votes)
10 views

VP04 1 SearchToolStrategies

1) The document discusses tools and strategies for pattern matching, including PMAlign and SearchMax. 2) It provides guidance on parameters for PMAlign like pattern polarity, granularity, elasticity, and runtime parameters to optimize accuracy and execution time. 3) The document gives guidelines for configuring tools for high accuracy pattern matching under different runtime conditions.

Uploaded by

inigofet
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

VP04 1 SearchToolStrategies

1) The document discusses tools and strategies for pattern matching, including PMAlign and SearchMax. 2) It provides guidance on parameters for PMAlign like pattern polarity, granularity, elasticity, and runtime parameters to optimize accuracy and execution time. 3) The document gives guidelines for configuring tools for high accuracy pattern matching under different runtime conditions.

Uploaded by

inigofet
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

Search Tools and Strategies

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.

You can configure PatMax


to ignore the polarity of the Trained pattern
pattern and use only feature
shape information

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.

Object PatMax using Polarity PatMax ignoring Polarity

EXPECTED
MATCH

PatMax Pattern 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

As you increase elasticity, PatMax


may find unintended matches -
Accuracy decreases

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

How Granularity Works


32 Boundary Points
• Granularity works to limit the
number of boundary points
extracted from features in an
image.
• A granularity value of 6 means that
boundary points will have a radius
of 6 pixels where no other
boundary points can exist.
• A granularity value of 1 means that
boundary points will have a radius
of 1 pixel where no other boundary
points can exist.

104 Boundary Points


10

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

Run-time Parameters Revisited


• Clutter
- Extraneous features at
runtime

• 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.

• For a boundary point to be


detected its feature contrast 31 16
must exceed this value.

5
15

Discarding Overlapped Results

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

Guidelines for Run-time Accuracy


• Never ask PatMax to figure out what you already know or
should know
– Prefer “consider polarity”
– Prefer elasticity very close to 0.0
– Prefer nominal DOF settings
– If you need to use DOF zones, set them based on realistic
expectations of object variation

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

• Presentation and illumination


– Minimize specular reflections, shadows, non-linear changes,
occlusion, non-uniform contrast variations

21

Guidelines for High Accuracy


• Camera
– Use a quality lens to minimize distortion
– Stick to the middle of the field of view
– Focus carefully
– Adjust aperture to avoid saturation
– Calibrate the camera to the system
• Larger patterns are more accurate
• Make sure fine granularity is 1.0
– If the automatic selection picks a larger value, you will get a warning

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

• In most situation, PatMax will be faster and more accurate –


but…

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

Where to use SearchMax


• Grey level images with small models
– For e.g. 15x15 pixel
• Images that would create too many features for PatMax
– Page of written text
– Textured objects
• Object doesn’t segment well due to color variations
• Skewed objects

• Where not to use SearchMax


– If many degrees of freedom are required at the same time
– Noisy background
– Tool may end up being too slow
26

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.

You can either:


• Set your degrees of
freedom at runtime
Or
• Train on the degrees of
freedom required

28

14
Results

•SearchMax is able to find


all four results – even the
skewed one

•PatMax is not able to find


the skewed item

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

You might also like