Professional Documents
Culture Documents
Session 5
Objectives:
• The student will correctly:
Analyze an image for the presence/absence of a part using a
Histogram tool
Choose the appropriate fixture tool as needed in a vision application
Create and configure a Fixture Tool
Use terminals to pass data between tools
Identify the use of Coordinate Spaces in vision applications
1
Histogram Tool
Histogram
Histogram creates statistics and a plot of the grey values
found within a specified area of the image
2
Histogram
• A histogram may be used to:
– Detect the presence or absence of something in the image
– Monitor the output from a light source
• A software light meter
– Measure the uniformity of the grey values within an image
– Determine the grey-value distribution in an image to set-up other
vision objects
3
Histogram Images
• Histogram has three images
associated with it (tool
dialog)
• Current.InputImage is the
image Histogram will analyze
on the next run
– In this case, the image comes
from the Output image of the
Image Source
Histogram Images
• LastRun.InputImage is the
image on which the last
execution of Histogram took
place
4
Histogram Images
• LastRun.Histogram is a plot
of the grey-level distribution
Region of Interest
• By default, Histogram runs on the
entire image
• To analyze a single area of the
image, choose a region shape and
manipulate on the
Current.InputImage
10
5
Graphics
• Optionally, change which
graphics appear at run-
time
11
Results
• Results appear
in control and
floating results
grid
• May also be
accessed in VB
or C# code
12
6
Coordinate Spaces
14
7
Calibration and Fixturing
• Coordinate Spaces can be achieved through:
– Fixture Tool (this section)
– FixtureNPointToNPoint Tool (this section)
– CalibNPointToNPoint Tool (later section)
– Checkerboard Calibration Tool (later section)
– Manually configuring and passing a 2D Transform (later section)
15
Root Space
• The Root Space is a left-handed coordinate system perfectly
aligned with the pixels of an acquired image prior to any image
processing
– May be different for synthetic or linescan images
16
8
Root Space
Image now has
• VisionPro automatically re-adjusts the fewer pixels; note
that the root grid
root space as an image undergoes lines no longer
image processing or sub-sampling correspond to the
pixel boundaries.
17
User Space
• VisionPro lets you define any number of additional coordinate
systems
18
9
User Space
• You determine:
– Units
– Handedness
– How it relates to the image’s root space
2.3, 8.5
19
Pixel Space
• A pixel space is like the root space in that
– Its origin is always in the upper-left corner
– Its space corresponds to the image pixels
• However, the pixel space does not adjust to reflect the effects
of image processing
20
10
Coordinate Space Trees
• Coordinate space trees contain
– An image’s root space
– All user spaces you created
– How all the spaces are related to each other
• a.k.a. Transformation
21
22
11
Selected Space
• At all times, one space within the tree is the Selected Space for
the image
23
Selected Space
• Creating a new image through some transformation adds a new
coordinate space to the coordinate space tree
– And automatically selects the space as the new image's selected
space name
24
12
Fixture Tool
Fixture Tool
• The Fixture Tool is used to create a
fixture coordinate system when you
already have a coordinate transform
calculated
– In our example, we’ll find our part using
PMAlign; it produces a transform in its
results
26
13
Our Problem:
• Then we’ll create a Caliper to measure
the width of the center “tab”
27
Getting Started
• Create and configure an
Image Source and a
PMAlign Tool trained to
find the right “ear” of the
bracket
28
14
Add Fixture Tool
• Then add a
CogFixtureTool and
connect its InputImage
to the Image Source’s
OutputImage
29
Connect Transforms
• Take the transform determined by
PMAlign and use it as our Fixture
• Connect the Pose Result of
PMAlign to the Transform of the
Fixture
– If you individually wanted to
supply X, Y, and rotation, you
could connect to those
terminals individually
30
15
Run the ToolGroup
• Run the ToolGroup to pass the image and transform to the
Fixture Tool
31
Settings
• In most applications,
that’s it
• In some cases, you may
want to manipulate the
transformation before
running the subsequent
vision tools
32
16
Add a Caliper
• Now add the Caliper and
connect its InputImage to
the OutputImage of the
Fixture
33
34
17
FixtureNPointToNPoint
Reference Fixturing Method
36
18
Our Problem
• Measure the width of the tab on the bracket, using the centers
of the holes to indicate where the part is in the FOV
37
Add Tools
• Create and configure an
Image Source and a Blob Tool
38
19
Add FixtureNPointToNPoint Tool
• Now add a
FixtureNPointToNPoint Tool
39
Adding Terminals
• Right Click on Blob
Tool and Add
Terminals
40
20
Link Terminals
• Connect the newly
exposed terminals to the
Fixture input points
41
Degrees of Freedom
• In the FixtureNPoint control,
choose the degrees of freedom
used when determining the best-
fit transformation between
fixtured and unfixtured points
– In other words, how do you
expect your part to change
from image to image?
– Then be sure you have
enough points to perform the Type # of Points
appropriate transformation
Translation 1
42
21
Grab Reference Image
• Press the Grab Reference Image and Points button
43
44
22
Using FixtureNPoint
• Now add a Caliper and
connect its InputImage to
the OutputImage of the
FixtureNPoint Tool
45
23