background image

CHAPTER 7. COIN 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 II

application.

Содержание NI myRIO

Страница 1: ...Ed Doering NI myRIO Vision Essentials Guide...

Страница 2: ......

Страница 3: ...NI myRIO Vision Essentials Guide Ed Doering Electrical and Computer Engineering Department Rose Hulman Institute of Technology...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 11: ...Part I Machine Vision Fundamentals...

Страница 12: ......

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 31: ...Part II Introductory Machine Vision Projects...

Страница 32: ......

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 38: ...32 CHAPTER 4 CAMERA SETUP...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 44: ...38 CHAPTER 5 STEREO VISION...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 50: ...44 CHAPTER 6 COIN CALIPER I Dmax and illuminate a proportional number of LEDs for a measured diameter between Dmin and Dmax...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 61: ...Part III Machine Vision Application Projects...

Страница 62: ......

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 72: ...66 CHAPTER 8 COIN COUNTER...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 92: ...86 CHAPTER 11 DMM TEST STAND...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 134: ...128 CHAPTER 17 MARBLE SORTER...

Страница 135: ...Part IV Appendices...

Страница 136: ......

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 148: ...142 APPENDIX D BUILD A STAND ALONE APPLICATION...

Страница 149: ...E MarbleSorterConstructionDetails To be continued...

Страница 150: ...144 APPENDIX E MARBLE SORTER CONSTRUCTION DETAILS...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Отзывы: