Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
111 views19 pages

VP03 1 PatMaxBasic

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)
111 views19 pages

VP03 1 PatMaxBasic

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/ 19

PatMax® – Getting Started

Session 3

Objectives
• The student will correctly:
 Identify applications where PMAlign can be used to inspect
 Understand the concepts behind how the tool works
 Create and configure a PMAlign tool to find a pattern under various
run-time conditions
 Train a pattern and determine if the automatically extracted features
are valid for the application
 Evaluate parameter settings to determine which are needed for basic
run-time conditions

1
PMAlign

Introducing PatMax
• PatMax is a pattern-location
search technology
– PatMax patterns are not
dependent on the pixel grid
• A feature is a contour that
represents the boundary between
dissimilar regions in an image
• Feature-based representation can
be transformed more quickly and
more accurately than pixel-grid
representations

2
PatMax Capabilities
• With one tool measure
– Position of the Pattern
– Size relative to the originally trained pattern
– Angle relative to the originally trained pattern
• Unprecedented accuracy
– Up to 1/40 pixel translation
– Up to 1/50 degree rotation
– Up to 0.05% scale
• Increased speed
– Basic pattern finding is faster
– Angle and size determined quickly

PatMax Capabilities
• Improved alignment yield
– Handles wide range of image contrast
– Defocus, partial occlusion, and unexpected features can be tolerated
• Easier to use
– Direct measurement of angle and size in one step
– Patterns may be transported between machines without loss of fidelity
– Single tool functions more accurately and efficiently than previously
needed multiple tool solution

3
PatMax Applications
• Align a printed circuit
board based on
fiducials (alignment)

PatMax Applications
• Locate tabs on peach cans;
variations in translation,
rotation, and lighting
(presence / absence detection)

Result: 4
Result: 3
Result: 2
Result: 1
Score: 0.97
Contrast: 0.94
Fit Error: 0.02
Location: x= 351.08
y= 245.92
Angle: 0.09
X-Scale: 1.0
Y-Scale: 1.0

4
PatMax Applications
• Identify engine block by type
despite extreme similarity
between types, lighting
variations, and part rotation
(sorting and classification)

PatMax Algorithms
PatQuick PatMax PatFlex High Sensitivity

• Best for speed • Best for high • Designed for • For low
• Best for three- accuracy highly flexible constrast/high
dimensional or • Great on two- patterns noise images
poor quality parts dimensional parts • Great on curved • Used with very
and uneven noisy backgrounds
• Tolerates more • Best for fine surfaces • Good for images
image variations details
• Extremely that have
flexible, but less significant video
• Example: Pick and • Example: Wafer acurate noise or image
Place alignment degradation
• Example: Label
** PatQuick is the cursory location • Example:
part of the PatMax Obscured part in
algorithm bag

10

5
Linking Tools
• You need images for:
– Pattern training
– Run-time inspection

• Link the OutputImage of the


Image Source to the InputImage
of PMAlign
– Drag and drop

11

Training a Pattern
• The PMAlign Tool has three
images associated with it

• To train our pattern, we need


a Current.TrainImage

12

6
Current.InputImage
• PMAlign Tool also has a
Current.InputImage that can
either be a run-time image or
can be “grabbed” as a
training image
(Current.TrainImage)

13

The Big Picture


Train a Pattern

Set Run-time
Parameters

Run PatMax
on the Image

Get PatMax Results

14

7
Grab Train Image
• Press the Grab Train Image button in the control

15

Pattern Region and Origin


• When using graphics
– Drag and resize training
box around pattern
– Position origin at
appropriate location

16

8
Pattern Region and Origin
• Next, define the region
of pixels containing the
pattern to be trained
and the pattern origin
– Use graphics or enter
values in the Train
Region & Origin tab

17

Model Origin
• Model origin identifies the point which will be reported
to you when PatMax locates an instance of the model
in the search scene

• To maintain the greatest accuracy, the origin point


should be placed at the center of the pattern region

Most accurate Less accurate


Origin

Origin

18

9
Train Pattern
• Press the Train button to
train the pattern
– PatMax finds the
features in the Region

19

PatMax Patterns
• When you train a pattern, PatMax
determines the features contained
in that pattern
• A feature is a contour that
represents the boundary between
dissimilar regions in an image
• A feature is described by a list of
boundary points that lie along the
contour
– Boundary points are defined by
position (x, y) in the image and its
direction normal to the contour

20

10
Pattern Features
• To see what PatMax
has detected as
features to look for
with this pattern,
check the Train
Features Graphics

21

Pattern Features
• Yellow lines indicate coarse
features
– Those used by PatQuick
• Green lines indicate fine
features
– Those used by PatMax

22

11
Pattern Features
• Zoom in to get a closer
look at the detected
features

23

InfoStrings
• Watch for any InfoStrings
– These will indicate if the pattern training was successful
– They will also warn of potential problems with the trained pattern

24

12
Pattern Training
General guidelines for PatMax pattern training:
• Select a representative pattern with consistent features
• Reduce needless features and image noise
• Train only important features
• Consider masking to create a representative pattern
• Larger patterns will provide greater accuracy
• Really, the more boundary points, the greater accuracy

25

Run-time Parameters
• Choose the run-time algorithm
• Then a Search Mode
– Search Image uses entire image
– Refine Start Pose uses another tool’s results for start
• Then specify the number of instances to find in the run-time
image
• Indicate the Accept threshold

26

13
Accept Threshold
• Accept Threshold is a score (between 0 and 1.0) that PatMax
uses to determine if a match represents a valid instance of the
model within the search image. Increasing the acceptance
value reduces the time required for search.

Accept Threshold
0 1.0

Not Valid Valid


Matches Matches

27

Coarse Accept Threshold


• Known PatMax behavior
– Accept Threshold = 0.5 -> no pattern found
– Accept Threshold = 0.49 -> pattern found with Score 0.85 !

PatQuick Model PatMax Model Runtime Model

• Now exposing intermediate coarse accept threshold


– You can now modify this if candidates don‘t pass

28

14
Coarse Accept Threshold

Manually set
Coarse Threshold

Use Coarse Score to


set Coarse Threshold

29

Degrees of Freedom
• Set either a nominal value or range of values
– Use the arrows to toggle between which you use
– Also toggle between degrees and radians for angle
– ScaleX and ScaleY are advanced parameters

30

15
Search Region
• By default, PatMax searches
the entire image for potential
matches
• To have PatMax look in only a
portion of the image, use a
Region Shape
– Either type in values or use
graphics to set size and
position

31

Graphics
• Last, select the
graphics to be shown
at run-time
– Remember graphics
take time to update

32

16
Run PatMax
• Press the Run button to run
PatMax on the current input
image

• If an instance is found,
designated graphics will
appear on the last run input
image

33

Results
• Results are displayed
under the Results tab

• If multiple instances are


found, they are returned
in descending order of
score

34

17
Results
• Score
– How well the result features match the trained pattern features

• X, Y
– The location of the found pattern in terms of the specified origin point

• Angle
– The angle of the found pattern relative to the originally trained pattern
– If nominal angle is used, this always equals the nominal value

35

Results
• Fit Error (PatMax algorithm only)
– 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 (PatMax algorithm only)


– a measure of the extent to which all parts of the trained pattern are also
present in the search image

• Clutter (PatMax algorithm only)


– a measure of the extent to which the found object contains features that are
not present in the trained pattern

36

18
Results
• Scale
– The size of the found pattern compared to the originally trained
pattern
– If nominal scale is used, this always equals the nominal value
– a.k.a. Uniform Scale

• Scale X, Scale Y
– The size of the found pattern compared to the originally trained
pattern in X and Y directions
– If nominal scale is used, this always equals the nominal value

37

Summary
• PatMax is a location based search tool
• Provides high accuracy (up to 1/40 pixel) results

38

19

You might also like