CHAPTER 12. GAUGING STATION
91
Set the coordinate system to a reference feature
After calibrating and correcting the image the gauging application must identify
a reference feature on the component to establish a local coordinate system for
subsequent measurements. In this way the gauging application allows a certain
degree of variety in component alignment with the camera pixel array and
eliminates the need for a precise mechanical fixture to accomplish the alignment.
Use the following sequence of steps to place the origin of the coordinate
system at the lower-right corner of the component pictured in Figure 12.3 on
the facing page:
1. Find the vertical edge that corresponds to the right side of the component;
see
to learn how to find a straight edge in a region
of interest (ROI),
2. Find the horizontal edge that corresponds to the bottom of the component
using another
Find Straight Edge
step,
3. Locate the intersection of these two lines as the bottom-right corner of the
component to serve as the reference point for the coordinate system. See
Find the Intersection of Two Lines
to learn how to use the
Caliper
step
to find the coordinates of the intersection of these two lines, and
4. Define the coordinate system with its origin at the bottom-right corner of
the component and aligned with the component’s vertical edge; see
for details.
All ROIs that you define in subsequent script steps use this local coordinate
system and will automatically follow the component as it translates and rotates.
Measure the component height and width
The
Clamp (Rake)
step easily measures
H
and
W
; see
for details. If your representative image is not sufficiently
aligned with the camera’s pixel array you may need to use a rotated ROI as
illustrated in
Measure Width with “Clamp (Rake)” (Rotated ROI)
IMPORTANT
:
Assign meaningful names to
every
step! You will
frequently need to set up later steps based on the results of earlier steps,
and the default names will rapidly become too confusing.
(2:25)
(2:04)
(2:02)
(2:18)
(2:36)
Summary of Contents for NI myRIO
Page 1: ...Ed Doering NI myRIO Vision Essentials Guide...
Page 2: ......
Page 11: ...Part I Machine Vision Fundamentals...
Page 12: ......
Page 31: ...Part II Introductory Machine Vision Projects...
Page 32: ......
Page 38: ...32 CHAPTER 4 CAMERA SETUP...
Page 44: ...38 CHAPTER 5 STEREO VISION...
Page 61: ...Part III Machine Vision Application Projects...
Page 62: ......
Page 72: ...66 CHAPTER 8 COIN COUNTER...
Page 86: ...80 CHAPTER 10 KEYED OPTICAL LOCK...
Page 92: ...86 CHAPTER 11 DMM TEST STAND...
Page 134: ...128 CHAPTER 17 MARBLE SORTER...
Page 135: ...Part IV Appendices...
Page 136: ......
Page 143: ...B MXPandMSPConnectorDiagrams Figure B 1 MXP myRIO eXpansion Port connector diagram...
Page 144: ...138 APPENDIX B MXP AND MSP CONNECTOR DIAGRAMS Figure B 2 MSP miniSystem Port connector diagram...
Page 148: ...142 APPENDIX D BUILD A STAND ALONE APPLICATION...
Page 149: ...E MarbleSorterConstructionDetails To be continued...
Page 150: ...144 APPENDIX E MARBLE SORTER CONSTRUCTION DETAILS...