background image

CHAPTER 9. POS TERMINAL

69

(a) Representative images

(b) Vision Assistant script

(c) LabVIEW project file set

9.1

Technical Approach

NI Vision Assistant Script

NI Vision Assistant provides the

Barcode Reader

step as a flexible and easy-to-

use method to detect 1-D barcodes from among ten different standards including

“EAN 13” (European Article Number) and the essentially equivalent “UPC-A”

(Universal Product Code). This step can even detect multiple barcodes of differ-

ent types, all within the same image. The

Barcode Reader

step is scale invariant

(the barcode can be any size) as well as rotation invariant (the barcode angle does

not matter); the only requirement is that the barcode must be in focus with suffi-
cient spatial resolution to resolve the black and white bar pattern. Study

EAN-13

(UPC-A) Barcode Reader

1

to learn how to set up the

Barcode Reader

step.

The Vision Assistant Express VI offers two indicators for the

Barcode

Reader

; use the

Barcodes

output. This output is an array because the reader

can read multiple barcodes at once. Use the following techniques to interpret
the barcode output:

1. Use the

Index Array

function to retrieve a single barcode and connect this

to a custom control in the data highway,

T

IP

:

Use the “Quick Drop” shortcut (Ctrl + space bar) to look up

and place a LabVIEW element by name. See Appendix C on page 139
for more LabVIEW tips.

2. The “Data” element of the barcode output is a string that contains the nu-

merical code. Use the

Empty String/Path?

function to determine whether

or not a valid barcode is in view, and

3. Use the

Decimal String To Number

function to convert the “Data” element

string to an

[I64]

integer; wire a zero-valued constant of this data type to

the

default

input.

1

http://youtu.be/hLSla3C-6V4

(1:29)

Summary of Contents for NI myRIO

Page 1: ...Ed Doering NI myRIO Vision Essentials Guide...

Page 2: ......

Page 3: ...NI myRIO Vision Essentials Guide Ed Doering Electrical and Computer Engineering Department Rose Hulman Institute of Technology...

Page 4: ...errors or omissions of any kind to update any information or for any infringement of any patent or other intellectual property right Neither the author nor the publisher makes any warranties of any ki...

Page 5: ...esign Pattern for Machine Vision Applications 11 II Introductory Machine Vision Projects 25 4 Camera Setup 27 5 Stereo Vision 33 6 Coin Caliper I 39 7 Coin Caliper II 45 III Machine Vision Application...

Page 6: ...ector 101 15 Motion Detector 107 16 Auto Pan Camera 111 17 Marble Sorter 119 IV Appendices 129 A Recommended Equipment 131 B MXP and MSP Connector Diagrams 137 C LabVIEW Quick Tips 139 D Build a Stand...

Page 7: ...lication development flow suitable for all of the machine vision projects in this book The development flow includes defining the application s requirements configuring the imaging system and acquirin...

Page 8: ...on of NI myRIO Vision Essentials Guide is always avail able as a free download at http www ni com myrio vision guide page iv shows the document version The download also includes the Machine Vision Ap...

Page 9: ...ocumentation subfolder in which students can place a lab report and any other documentation that you wish The project folders may then be bundled into a single zip file and uploaded to your course man...

Page 10: ...Machine design pattern that serves as the basis of the Machine Vision App project template Isaac Sanchez and Alex Drane for timely advice on LabVIEW vision techniques and Margaret Barett for inviting...

Page 11: ...Part I Machine Vision Fundamentals...

Page 12: ......

Page 13: ...eate a desktop application in case you do not have access to the NI myRIO target Figure 2 1 on the following page visualizes the application development flow as an eleven step procedure and the remain...

Page 14: ...al world units define requirements configure imaging system acquire representative images calibrate camera develop processing script develop LabVIEW project validate application Y N Figure 2 1 Develop...

Page 15: ...ect images over the range of possible conditions Select the Target as This Computer for a desktop connected camera and as Select Network Target when the cam era is connected to myRIO use IP address 17...

Page 16: ...ress VI Open the Vision Assistant script created in Step 5 Remove the color to luminance step assuming the camera is in grayscale output mode Click through the steps to confirm correct operation Selec...

Page 17: ...lab manual may be developed 3 1 State Machines The excellent textbook Effective LabVIEW Programming1 by Thomas J Bress presents a wide range of design patterns based on the state machine A state em b...

Page 18: ...nsors to determine which task an ordered sequence of states should be performed next The scheduler applies this ordered sequence of states comprising a task to the input of a queue also known as a FIF...

Page 19: ...to edit and achieves expected and reliable behavior without expending unnecessary development effort QSM Structure Figure 3 2 on page 20 shows the task diagram for the Machine Vision App MVA template...

Page 20: ...ur6 Quick paced tour of the Main VI while loop case structure state queue front panel controls NI myRIO ports and data highway 3 MVA States7 Review the standard states qsm myRIO image the example appl...

Page 21: ...s VI indicator output convert to type def save type def as a control add the control to the data highway merge the Vision Assistant Express VI output onto the data highway and then retrieve the value...

Page 22: ...n Invoke Node to release front panel action buttons This state is normally enqueued at the end of a task that responds to a front panel action button to automatically release the button without this s...

Page 23: ...rnal peripheral devices 3 myRIO update ports myRIO update ports30 Read and write myRIO on board and peripheral devices You will often find conve nient or necessary to place the myRIO Express VIs in ot...

Page 24: ...he analyzed image buffer as its output Most Vision Assistant script steps produce clusters or arrays that are not available as standard front panel controls when editing the data highway however it is...

Page 25: ...E VISION APPLICATIONS 19 start up schedule states task A task B shut down condition A condition B start stop stop or error task C update images and devices condition C otherwise Figure 3 1 Task diagra...

Page 26: ...IGN PATTERN FOR MACHINE VISION APPLICATIONS start up schedule states save image update images and devices shut down save image otherwise start stop stop or error Figure 3 2 Task diagram for the Machin...

Page 27: ...nalysis results image analyze Read the image buffer reference s Read image analysis results and other information Format information into overlay text graphics Attach nondestructive overlay to image b...

Page 28: ...eferences intended for saving Determine which image buffer to save based on mode switches and flags Merge overlay if required and write the image file save image Reinitialize all front panel action bu...

Page 29: ...es Perform other needed one time only initializations qsm initialize Reinitialize all front panel action buttons to their default unclicked state qsm release Configure onboard devices e g PWM SPI I2C...

Page 30: ...g outputs digital outputs PWM Shut down external devices myRIO clean up Check stop webcam flag stop webcam if set Get next available webcam image Optionally flip the image when using camera stand Writ...

Page 31: ...Part II Introductory Machine Vision Projects...

Page 32: ......

Page 33: ...real world units instead of pixels Calibration can also correct or at least mitigate various non ideal effects such a misaligned image sensor and lens distortion In this project you will learn how to...

Page 34: ...the required spatial resolution RS I Study the video Camera Setup Principles1 to learn how to use the minimum feature size SF and the required number of pixels NF to determine the spatial res olution...

Page 35: ...a to object distances Use limiting values such as the closest distance that still maintains sharp focus and the farthest distance at the limits of your camera copy stand as well as several in between...

Page 36: ...d you will investigate two of them in this section Point distance calibration The point distance calibration is the simplest technique and requires negligible computational effort This calibration ass...

Page 37: ...mera calibration step must be repeated any time that you change the camera configuration Also be aware that the calibration is only valid for objects that are in the same plane as the dot grid i e cal...

Page 38: ...32 CHAPTER 4 CAMERA SETUP...

Page 39: ...eo streams from two webcams In this project you will learn how to set up your stereo vision apparatus calibrate the cameras and view the depth information as a pseudocolor image 5 2 Objectives 1 Calib...

Page 40: ...the example VI Calibrate Stereo Vision System In the same folder double click the IMAQVision chm help file expand the hi erarchy to select Machine Vision VIs Stereo Vision VIs and then select both Ste...

Page 41: ...ompute Depth Image Example VI2 to get a sense of what you should expect to see 1 What is the distance from the camera to poster board on which the blocks rest 2 What is the thickness of a block 3 What...

Page 42: ...stereo vision apparatus to match that shown in Figure 5 1 The camera to camera baseline distance B is 6 cm and the camera to baseboard distance D is 24 cm Figure 5 1 Stereo camera setup D camera to ba...

Page 43: ...Study the video tutorial Calibrate Stereo Cameras5 to learn how to calibrate the stereo cameras with your dot grid target Save the calibration file so that you need not repeat this step I Use plastic...

Page 44: ...38 CHAPTER 5 STEREO VISION...

Page 45: ...le circular coin and reports the coin s measured diameter in real world units millimeters Technical Approach The NI Vision Max Clamp step automatically detects the boundary of an object and measures i...

Page 46: ...e frames per second fps both displayed and acquired as reported by NI MAX for each of available video modes of your webcam as well as the two types of output color and grayscale if available Connect t...

Page 47: ...can choose You can also access cameras con nected to NI myRIO within Vision Assistant Choose Select Network Target instead of This Computer and then enter the IP address as either 172 22 11 2 when my...

Page 48: ...base LabVIEW myRIO project 12 Follow along with the video Step 4 Create LabVIEW Project5 to learn how to create a new LabVIEW project for the NI myRIO target NOTE You can also use the desktop as your...

Page 49: ...lication 19 Test your completed Coin Caliper application How robust is the ap plication For example how much variation do you see in the diameter mea surement with the coin just sitting there in the d...

Page 50: ...44 CHAPTER 6 COIN CALIPER I Dmax and illuminate a proportional number of LEDs for a measured diameter between Dmin and Dmax...

Page 51: ...to implement a more sophisticated version of the Coin Caliper application you created in the previous project Follow along with the step by step tutorials to gain experience with the various template...

Page 52: ...drive when save image is clicked or when the NI myRIO onboard button is pressed 7 Define the image file name as a user defined base name combined with the image sequence number 8 Display the number o...

Page 53: ...easure Width with Clamp Rake 2 to learn how to configure this step Select the ROI Descriptor control and the two Distance indicators when you import the script into the LabVIEW Vision Assistant Expres...

Page 54: ...ename and Open Project10 Extract the Machine Vision App MVA template from the zip file downloaded from the NI myRIO Vision Essentials Guide11 site rename the folder rename the lvproj file open the pro...

Page 55: ...eate an action button for the calibrate state 8 Step 8 Create Increment State18 Create the increment file number state and add file number to the data highway 9 Step 9 Create Calibrate State19 Create...

Page 56: ...d attributes 15 Step 15 Run and Debug25 Coin Caliper II demo Step 15 15 Run and debug the application until it works properly Congratulations You have now implemented your first machine vision ap plic...

Page 57: ...N CALIPER II 51 start up schedule states save image calibrate shut down save image calibrate start stop stop or error update images and devices otherwise Figure 7 2 Task diagram for the Coin Caliper I...

Page 58: ...nt panel control Calculate calibration scale factor Write scale factor to Calibration X Step and Calibration Y Step calibrate Reinitialize all front panel action buttons to their default unclicked sta...

Page 59: ...e Form image file name from image file basename front panel control and file number Merge overlay and write the image file save image Read file number Increment by one and write back increment file nu...

Page 60: ...s and diameter mm image analyze Read the image buffer reference Read diameter pixels and diameter mm Retreive system date and time Format information into overlay text Attach nondestructive overlay to...

Page 61: ...Part III Machine Vision Application Projects...

Page 62: ......

Page 63: ...nd there Does counting all of those pennies seem like too much bother Save a trip to the bank and create your own machine vision application to look at a collection of coins and instantly show you the...

Page 64: ...iameter of the coin used for calibration and 8 Display the calibration scale factor Figure 8 1 on the previous page shows the front panel of the Coin Counter application Note the use of distinct foreg...

Page 65: ...n Assistant Script NI Vision Assistant provides the Circle Detector step as a powerful yet simple to use method to detect circular objects in a binary two level image and report the center coordinates...

Page 66: ...p 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 sc...

Page 67: ...page 137 LabVIEW Techniques The following LabVIEW techniques are required for this project Get ROI from Image Display12 Get the ROI region of interest from the main image display with a Property Node...

Page 68: ...ing the number of coins that fit within the FOV while also maximizing the frame rate Strive for a balance of frame rate FOV size and accuracy Later on you may find that you need to make some adjustmen...

Page 69: ...u may find that intraclass variation is too high to identify a threshold value i e the measured radii distribution of the two coin classes nearest in size overlaps If so begin by adjusting the camera...

Page 70: ...look up and place a LabVIEW element by name See Appendix C on page 139 for more LabVIEW tips Create a calculate value state to sum the individual coin values with a for loop structure auto indexed by...

Page 71: ...ping coins and coins only partly in view how much overlap can be tolerated before you observe classification errors 8 4 Optional Extra Features You may wish to add one or more of these extra features...

Page 72: ...66 CHAPTER 8 COIN COUNTER...

Page 73: ...t at the end of a shopping trip Create your own POS terminal to tally up the total price of barcoded items and use external switches and an LCD display to make your terminal run as a stand alone appli...

Page 74: ...vate two NI myRIO on board LEDs and a front panel indicator when a barcode is in view that has been read successfully 7 Clear the shopping cart total to zero when either the Empty Cart front panel but...

Page 75: ...n Study EAN 13 UPC A Barcode Reader1 to learn how to set up the Barcode Reader step The Vision Assistant Express VI offers two indicators for the Barcode Reader use the Barcodes output This output is...

Page 76: ...le However the update shopping cart task should execute one time only when the barcode in view flag first changes from clear to set Study Create Flag Change SubVI8 to learn how to create a subVI that...

Page 77: ...look for a site that can generate an EAN 13 barcode given a user supplied value Determine the camera distance and camera mode resolution and frame rate that achieves your required spatial resolution...

Page 78: ...ebsite URL you can use any string that you like Learn more about QR codes at QR Code Standard19 The OCR OCV step performs optical character recognition OCR to directly read printed text and numbers Th...

Page 79: ...al key with encrypted radio pulses RFID magnetic stripes and integrated circuits Before the familiar metal keys disappear completely try this mash up of the old and the new by presenting a metal key t...

Page 80: ...analyzed image when show analyzed is pressed otherwise display the webcam image Figure 10 1 on the preceding page shows the front panel of the Keyed Optical Lock application and Figure 10 2 on the ne...

Page 81: ...nts include front panel screen shots to demonstrate that your application meets functional specifications 2 zip archive file containing all project files a Representative images b Vision Assistant scr...

Page 82: ...the Geometric Matching step to match perimeter contours against a template The reflected highlights from a metal key tend to distract the curve extraction routines employed by Geometric Matching Clip...

Page 83: ...f the camera attributes to manual and adjust the brightness contrast and exposure to ensure that the background looks completely black while the foreground metal key maintains good contrast Experiment...

Page 84: ...ther contour for the hole in the key bow is acceptable Click OK until you are prompted to save the template image you will eventually need to copy this image to the USB thumb drive for myRIO After you...

Page 85: ...CHAPTER 10 KEYED OPTICAL LOCK 79 Figure 10 3 Typical expected results for the Geometric Matching step...

Page 86: ...80 CHAPTER 10 KEYED OPTICAL LOCK...

Page 87: ...ng you need to apply a range of DC voltages and confirm that the numerical display is correct for each voltage Create a test stand for the DMM that will sweep the applied meter voltage visually observ...

Page 88: ...lay the AO voltage applied to the meter and the numerical value read from the meter 6 Clear the measurements and initialize the analog output voltage to the user supplied AO start voltage when clear i...

Page 89: ...age is somewhat difficult and not worth effort Fortunately you can easily create the compound ROI yourself on the main image display by drawing the first ROI as usual right click on the dis play and c...

Page 90: ...ieve a rectan gular ROI from the image display Concatenate Scalar to an Array6 Concatenate a scalar to an array Create an X Y Plot7 Use a Bundle node to create an X Y plot from two arrays 11 2 Develop...

Page 91: ...ter values for AO start and AO step e g 1 volt and 0 05 volts and then click the sweep button Expect to see changes in the indicators for applied voltage the meter reading and the X Y plot Click the c...

Page 92: ...86 CHAPTER 11 DMM TEST STAND...

Page 93: ...asured and compared against specified tolerances Traditional manual gauging requires tools such as dial calipers and micrometers but you can create a vision based gauging station that will take a larg...

Page 94: ...ature c Take measurements on specified dimensions such as height width depth angle and hole radius and d Report the measurements directly on an engineering drawing 3 Display the analyzed image when sh...

Page 95: ...LabVIEW project file set 12 1 Technical Approach NI Vision Assistant Script The NI Vision Assistant Machine Vision group contains a variety of tools to detect lines edges circles and other features r...

Page 96: ...era lens and perspective distortion see Grid Calibration1 for details The calibration image must be stored on a USB flash drive to be accessible to the vision script running on NI myRIO In addi tion a...

Page 97: ...to serve as the reference point for the coordinate system See Find the Intersection of Two Lines4 to learn how to use the Caliper step to find the coordinates of the intersection of these two lines a...

Page 98: ...fines the slot depth Sd Use a Find Straight Edge step to locate the bevelled left side edge of the component Take remaining measurements The Caliper step can easily make many measurements at once and...

Page 99: ...the camera attributes to manual and adjust the brightness contrast and exposure to ensure that the background looks completely black while the foreground component maintains good contrast Use a relat...

Page 100: ...ons Run either the Machine Vision App project or one of your exist ing projects with the image flip option enabled adjust the camera mode resolution right click on the image display and choose Save Im...

Page 101: ...how can small imperfections such as tears or smudges be detected among so many features The golden tem plate technique makes this type of inspection a snap images are compared to a defect free image t...

Page 102: ...n and 6 Display the analyzed image when show analyzed is pressed otherwise display the webcam image Figure 13 1 on the previous page shows the front panel of the Product Label Inspector application vi...

Page 103: ...2 Product label with two pencil smudge defects outlined and the corresponding binary image produced by the analysis script 2 zip archive file containing all project files a Representative images b Vis...

Page 104: ...te Comparison1 to learn how to set up this step and to create a golden template image The golden template comparison requires precise alignment between the candidate image and the template image there...

Page 105: ...the camera and mounting the label to a card makes handling more convenient and prevents wrinkling Create additional product label cards in which you introduce defects such as pencil mark smudges tears...

Page 106: ...option in the Machine Vision App template you will want to collect all of your images so that they appear in the same orientation when you develop your script Consider one of these two options Run eit...

Page 107: ...rucial reflow soldering step the board must be checked to ensure that all of the components are placed properly Create a mock up of a PCB component placement inspector that confirms whether or not a m...

Page 108: ...ound during the current session and 7 Display the analyzed image when show analyzed is pressed otherwise display the webcam image Figure 14 1 on the preceding page shows the front panel of the Compone...

Page 109: ...le sites can be checked within a single script step When packaged in a Vision Assistant Express VI the Color Matching step can generate both a Match Flag Boolean pass fail indicator and a Match Score...

Page 110: ...s origin at the bottom left corner of the board and aligned with the board s bottom edge see Set Coordinate System4 for details All ROIs you that you place in subsequent script steps reside in this lo...

Page 111: ...al setup remains undisturbed throughout this project The conditions under which you define the color matching ROIs must be identical to the way that your finished vision application collects images of...

Page 112: ...hoose Save Image Run NI MAX and save the images directly these will need to be flipped by batch processing in Vision Assistant see Batch Process a Folder of Images6 for details Manually renaming all o...

Page 113: ...like to secure Set up your webcam as a motion detector that will sound an alarm the moment that even the smallest feature in the camera s field of view has noticeable motion also known as optical flo...

Page 114: ...of the Velocity Image 1 4 Display the motion activity with a panel meter 5 Activate all four NI myRIO on board LEDs when the motion activity value exceeds a user defined threshold Figure 15 1 on the...

Page 115: ...option to use the previously calculated output as a starting point for the new calculation The IMAQ Overlay Motion Vectors VI accepts the pair of velocity component images generated above and generate...

Page 116: ...d by the panel meter TIP Use the Quick Drop shortcut Ctrl space bar to look up and place a LabVIEW element by name See Appendix C on page 139 for more LabVIEW tips The IMAQ Optical Flow HS VI will thr...

Page 117: ...e to side and may even walk away from the podium altogether Create an auto pan camera that combines a servo mounted webcam a position sensing algo rithm based on color and a closed loop control system...

Page 118: ...tween 100 and 100 when pan manually is pressed 7 Display the analyzed image when show analyzed is pressed otherwise display the webcam image and 8 Place a cross hair centered at the measured target po...

Page 119: ...rate that your application meets functional specifications 2 zip archive file containing all project files a Representative images b Vision Assistant script c LabVIEW project file set 16 1 Technical A...

Page 120: ...180 range The camera position controller can be completely implemented in the myRIO update ports state In this state the tracked object s measured X position from the vision script is converted into...

Page 121: ...to determine the number of image pixels in the X direction instead of hardcoding this value Servo control Chapter 17 of the NI myRIO Project Essentials Guide8 describes how to set the angle of a serv...

Page 122: ...panel control to set the desired position of the tracked object to a value between 0 left image boundary and 100 right image boundary Use a default value of 50 to place the object in the center of the...

Page 123: ...ters15 Perform basic mathematical operations with the Position cluster used by NI Vision tools Select Image Palette16 Use a Property Node to set the image display palette to either Binary or Grayscale...

Page 124: ...ay as well as a yo yo in the hands of an expert The tracked object remains perfectly centered in the camera s field of view at all times Optional extra features You may wish to add one or more of thes...

Page 125: ...r A typical sorting system consists of a hopper feeder camera vision algorithm and selector Create a marble sorter based on a color camera and two servomotors that automatically sorts a hopper full of...

Page 126: ...ually run the four step sorting process when run is pressed 5 Display the webcam image at the maximum possible frame rate while the marble sorter is idle 6 Continually display the detected marble colo...

Page 127: ...ssistant script c LabVIEW project file set 17 1 Technical Approach Marble Sorter Hardware The marble sorter hardware suggested for this project uses two servomotors to operate the feed disk and the bi...

Page 128: ...tem and guides the dropped marble into the selected bin Figure 17 2 Marble hopper feed disk and webcam right The feed disk rotates to the load position to pick up one marble then rotates back to the a...

Page 129: ...Servo Demo Walk Through7 to learn more about the code which may be downloaded at NI myRIO Project Essentials Guide zip Files8 The demo code uses the low level PWM VIs Open and Set Duty Cycle and Freq...

Page 130: ...the analyze position and then wait for the designated number of milliseconds to allow the servomotor to complete its motion TIP Use the Quick Drop shortcut Ctrl space bar to look up and place a LabVI...

Page 131: ...u will use for the analyze position Set the webcam mode to a relatively low resolution for high frame rate In this application the webcam is nothing more than a color sensor therefore high resolution...

Page 132: ...tion to pick out a single classification label Optional Extra Features You may wish to add one or more of these extra features Display the sensed color code index as a binary pattern on the NI myRIO o...

Page 133: ...CHAPTER 17 MARBLE SORTER 127 Figure 17 3 Bin selector arm located under the feed disk The bin selector rotates to one of the six color bins depending on the color analysis result of the vision script...

Page 134: ...128 CHAPTER 17 MARBLE SORTER...

Page 135: ...Part IV Appendices...

Page 136: ......

Page 137: ...y to get by with 800 600 or 640 480 The highest resolution of 1920 1080 has a maximum frame rate of three to five frames per second simply to receive and display the source video and subse quent proce...

Page 138: ...zer 1 Insert a plastic block of material 2 wrap with two narrow strips of duct tape and 3 wrap with a single wide piece of duct tape A 2 Tabletop Camera Copy Stand Figure A 2 Microsoft LifeCam Studio...

Page 139: ...lso the slightly reflective laminate surface often causes unwanted artifacts in the acquired image A 3 Grid Calibration Targets 1 1 cm Lined Grid3 see Incompetech s Grid Paper4 for additional target p...

Page 140: ...r quickly pick up dust Use a lint roller e g 3M Lint Roller6 to clean the surface just before you acquire images Black felt works as a reasonable replacement although it has a bit more visible pattern...

Page 141: ...era Bracket Desmond D3D 3 Mini Stereo Camera Bracket8 pictured in Figure A 4 on the following page Two 1 4 20 threaded camera mounts with plastic tightening wheels One 1 4 20 and one 3 8 16 mounting t...

Page 142: ...APPENDIX A RECOMMENDED EQUIPMENT Figure A 4 Desmond D3D 3 mini stereo camera bracket Provides a range of stereo webcam baselines Practical considerations Required for stereo vision machine vision proj...

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 145: ...2 Organization and tidying up Align objects Ctrl Shift A to invoke the most recent alignment type click Align Objects in the top center of the LabVIEW window to select the desired alignment method Di...

Page 146: ...o undo earlier actions Create a new control indicator or constant Right click on a terminal select Create and then choose the desired object Change existing control to constant etc Right click choose...

Page 147: ...application stored on the myRIO solid state hard drive that starts automatically when you power up the myRIO no USB cable required Study the tutorial Deploy a Stand Alone Application1 to learn the ste...

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

Page 151: ...ams Acquire Image in NI Vision Assistant3 Acquire a USB webcam image within NI Vision Assistant measure a distance on the image F 2 Stereo Vision Compute Depth Image Example VI4 Demonstrate the Comput...

Page 152: ...pt to convert the color webcam image to grayscale and then measure the coin diameter with the Max Clamp step test the vision script with the representative images collected earlier Step 4 Create LabVI...

Page 153: ...Main vi run the VI demo the buttons and stop NOTE The webcam must already be configured Run the MVA Project New Camera 19 Run the first time with a new camera Use NI MAX to generate the configuration...

Page 154: ...ing I2C data and setting up a PWM channel myRIO cleanup31 myRIO cleanup Example activities such as send digital and analog outputs to inactive states close PWM channel send I2C shutdown string myRIO u...

Page 155: ...type def bundle and merge and access in another state Remove Data Lane40 Remove an unused data highway lane edit the type def delete the control remove the element in the cluster bundle Add Custom Dat...

Page 156: ...load the Machine Vision App MVA template rename the folder rename the lvproj file open the project rename the while loop structure and rename the app Step 2 Interpret Specifications49 Coin Caliper II...

Page 157: ...red coin diameter to the nondestructive overlay Step 11 Edit Save Image State58 Coin Caliper II demo Step 11 15 Edit the save image state to obtain the base image name from a front panel control and t...

Page 158: ...les68 Use the Particle Filter to remove small noise particles based on the particle area measure Color Images Classify Colors69 Classify the color of a region of interest ROI according to classes defi...

Page 159: ...39 barcodes demonstrate how to acquire images within the stand alone version of Vision Assistant OCR Optical Character Recognition Training78 Train the OCR reader demonstrate how to acquire images wi...

Page 160: ...between two points Measure a Perpendicular Projection Distance86 Use the Caliper to measure the perpendicular projection distance between a baseline defined by two points and a third point Find Midpo...

Page 161: ...tric Matching 96 Find a reference feature with Geometric Matching to define a local coordinate system Golden Template Comparison97 Set up the Golden Template Compari son step Detect and Measure a Circ...

Page 162: ...with the Position cluster used by NI Vision tools Get Date and Time Strings107 Get the system date and time as strings using the Get Date Time in Seconds and Get Date Time String VIs Get ROI from Imag...

Page 163: ...rs wire the block diagram draw the icon connect the terminals save the subVI to the project folder and place the subVI into the caller VI Because this subVI contains a feedback node state memory selec...

Reviews: