60
CHAPTER 8. COIN COUNTER
clean image free of extraneous features, and the morphological operations “re-
move small objects” and “fill holes” available under the
Advanced Morphology
step work well for this purpose. The
Threshold
step offers a wide variety of
auto-thresholding operations to separate the foreground coin objects from the
background, and the auto-thresholding feature allows the thresholding step to
work reliably under changing lighting conditions.
You will find it convenient to set up your coin class diameter thresholds
as constants in the
(qsm) initialize
state based on real-world units such as
millimeters instead of pixels. Calibrate the image using the general technique
that you developed for the
Coin Caliper II
application (Chapter 7 on page 45),
e.g., image a coin of known diameter to recalculate the calibration scale factor
with an action button. As of this writing the
Circle Detector
step only provides
measurements in pixels, therefore you may omit the
Image Calibration
step and
simply use
Clamp Rake
to measure the diameter in pixels for a single selected
coin; for this reason remember to select the “ROI Descriptor” control and the
“Distance” indicator when you import the script into LabVIEW. Once you have
filled the FOV with coins you need to be able to draw an ROI around a single
coin instead of physically removing all but one coin.
Study these short video tutorials to learn how to use each of the recom-
mended NI Vision Assistant steps for this project:
•
Circle Detector
–
– learn how to configure the
range of acceptable radii and how to export measurements to an Excel file
for further analysis,
•
Advanced Morphology
– learn how configure the various operations such
as “remove small objects” (
•
Threshold
– learn how to manually thresh-
old an image or select from a variety of auto-thresholding routines.
•
Measure Width with “Clamp (Rake)”
– learn how to measure the diam-
eter of a single coin within the ROI.
(1:47)
(1:09)
(1:35)
(3:08)
(2:18)
Содержание NI myRIO
Страница 1: ...Ed Doering NI myRIO Vision Essentials Guide...
Страница 2: ......
Страница 11: ...Part I Machine Vision Fundamentals...
Страница 12: ......
Страница 31: ...Part II Introductory Machine Vision Projects...
Страница 32: ......
Страница 38: ...32 CHAPTER 4 CAMERA SETUP...
Страница 44: ...38 CHAPTER 5 STEREO VISION...
Страница 61: ...Part III Machine Vision Application Projects...
Страница 62: ......
Страница 72: ...66 CHAPTER 8 COIN COUNTER...
Страница 85: ...CHAPTER 10 KEYED OPTICAL LOCK 79 Figure 10 3 Typical expected results for the Geometric Matching step...
Страница 86: ...80 CHAPTER 10 KEYED OPTICAL LOCK...
Страница 92: ...86 CHAPTER 11 DMM TEST STAND...
Страница 134: ...128 CHAPTER 17 MARBLE SORTER...
Страница 135: ...Part IV Appendices...
Страница 136: ......
Страница 143: ...B MXPandMSPConnectorDiagrams Figure B 1 MXP myRIO eXpansion Port connector diagram...
Страница 144: ...138 APPENDIX B MXP AND MSP CONNECTOR DIAGRAMS Figure B 2 MSP miniSystem Port connector diagram...
Страница 148: ...142 APPENDIX D BUILD A STAND ALONE APPLICATION...
Страница 149: ...E MarbleSorterConstructionDetails To be continued...
Страница 150: ...144 APPENDIX E MARBLE SORTER CONSTRUCTION DETAILS...