Home
Modular-X User Guide
Contents
1. E m m E E E E E E E E E E E Figure 88 Example of calibration grid not actual size Figure 89 below shows how such a grid appears distorted Figure 89 Calibration pattern appears in distortion Below Figure 90 and Figure 91 illustrate how applying both Simple Calibration and Grid Calibration affect a perspective distorted image a grid in this case A gauge step is used to measure the distances between the dots in front and at the back 95 FUNCTIONS E ft co tee E EE E amp E E amp E E amp E FBC E amp E E amp E EEE fi titi E E E E E i BP Cet i E E amp E ee amp E amp E E amp E E amp E amp E amp E EEEE EE Game 2 eee eeeeeeeseca ce wa j 7 J il E 1 LE E E eseeegeeetcge he nh_eieeetsmpsez enitese sFtseite ess ss Distance 16 21 mm Step Data nna nna Distance 17 40 mm Step Data Distance 18 24 mm Step Data nnn nnna Figure 90 Gauge results after simple calibration eeeeveeeeeeeeeeeee e e3eeeees 7eeseneeeeeeee e bA E O O O O O E a E T ese Distance 19 33 mm Step Data oon snaa Gauge 2 Distance 19 32 mm Step Data Gauge results after grid calibration Figure 91 Nonlinear distortions include e Barrel distortion
2. Setto Measurement Figure 107 Set input to Constant or Measurement 5 In the following screen you may test run the VI by clicking lt Run VI gt button at the top Check Indicator if an additional Boolean indicator is wished to be considered in the Step Status check 6 Click Accept when finished Note Saving the project which includes Run VI function or functions will save only the VI that is browsed to Modular X If that VI requires specific subVIs for running then please copy them to the projects Run VI folder For remembering this the Save panel changes when there is a Run VI in the project Figure 108 Project Name Project Folder Substitute copy for original Copy will be in memory and updates all referencing files in the project to refer to the copy Run VI Detected AA C Create unopened disk copy Original will be in memory Copy will not be opened Figure 108 Save as menu when Run VI is detected Math Additional interactions between step and function results and other variables are often necessary Math step allows adding arbitrary extra math operations into the session Available operators in Math step are 104 FUNCTIONS e Addition x y e Subtraction x y e Multiplication x y e Division x y e Brackets xt y xty e Exponentiation x n where x is the base and n is the power e Square root sqrt x e Natural logarithm ln x Logu logs e Ex
3. 2 Press Refresh button to see updated values 3 Click on the Editor Mode button to leave this window 15 GETTING STARTED 13 Modular X 2 1 2 SANXO Systems Full Version File Edit Operate Window Help oes we Acquire Image Locate Check of Measure Identify Additional E E Images Enhancement Features Presence Features Parts Tools Tools P p ms a A Select Item ie FN D i Fa Weer Defined Variables PA Session Items Results _ Simulate 0 S E Global Variable 0 i Step Status Pass Result Mame Value a Fail O 00000 Parts Inspected o 00000 Pass a 00000 Run VI x 3 00000 FI Step Status Pasg y 2 00000 H Equal False L d Result 6 000 T z selectes Figure 9 Details viewer window View details View details option displays details of the highlighted function in the Session Tree The details are selective meaning that only the selected results will be then displayed in the Details Viewer To view details of a highlighted function 1 Select a function from Session Tree 2 Right click and select Details Ctrl D or click on the Information icon 3 Check the result that you want to observe in the Details Viewer Window 4 Click Done when finished and open the Details Viewer Window Ctrl Shift D 16 GETTING STARTED M X 2 1 Step Details Edges Find Edges 0 Result Name Yalue Result Type 1 C Step Status Pass Pass Fail 2 of Edges 3
4. 1 Unpack the downloaded file WinRaR download 2 Copy the uncompressed Configuration Files folder to the Modular X install folder The original Configuration Files folder is created under the installation You have to overwrite this folder in order to use this plugin 3 Download the IDS uEye Driver e Software Package Version 4 2 32 Bit for Windows e Software Package Version 4 2 64 Bit for Windows 4 Installation of IDS uEye Driver Modular X uses the IDS uEye ActiveX Control for camera configuration In order to use Modular X uEye Plugin the ActiveX Control must be installed You can install the component in the Setup Type step where the type of the installation can be Complete or Custom Figure 2 INTRODUCTION IDS uEye Setup 3 90 Select Features Select the features setup will install Select the features you want to stall and deselect the features you do not want to install w USE Device driver and tools Description Gigabit Ethernet device driver WE ye Actives control C Documentation C source code C Sample programs TWAIN driver UE pe Actives control F uEye DirectShow mtertace Q uEye DirectShow service l A Other drivers 1 58 MB of space required on the C drive 20r r20 MB of space available on the C drive Figure 2 IDS Setup select features 5 After installing the ActiveX control Acquire Images uEye control will be enabled and Modular X is ready to use uEye USB and GigE Cameras Unins
5. General 3 Save the int file The Debug Mode enables following features e In case of missing Resources they can be relocated or the steps can be disabled e Under the Session Tree menu a new option Debug Tools becomes available The following configurations can be accessed Figure 11 o Show image reference names o Highlight GetImage procedure Highlight Time Means how long the image is showed on each step Oo GDI Property List 18 GETTING STARTED 3 Debug Main vi Modular X Debug Tools Show Image Reference Names GDI Property List _ Highlight GetImage Procedure 300 Highlight Time Accept VA Cancel X Figure 11 Debug Mode debug tools Getting help For additional help you can contact us at support sanxo eu Don t hesitate to contact us for any help y p Examples Examples can be found in the Configuration Files folder which is located in the Modular X installation folder There are examples for several steps like Acquire Images e Simulate Image Enhancement e Gray Filters e Threshold Image Measure Features e Count Pixels e Intensity e Gauge 19 GETTING STARTED Locate Features Identify Parts Additional Tools Other Examples J Geometry Find Edges Straight Edges Circular Edges Coordinate System Detect Objects Match Pattern 1D Barcode Set Variable Inspection Status Wait Calibrate Image Run VI Math Euro Diameter Counti
6. F Edge 1 X Position Pixel 869 42413 X Position Pix 4 E Edge 1 Position Pixel 500 77002 Position Pix 5 C Edge 1 Distance Pixel 10 86378 Distance Pix 6 C Edge 1 Strength 69 00000 Score 7 C Edge 1 SNR 30 75638 Score 8 C Edge 1 Rising False Boolean 9 Edge 2 x Position Pixel 893 07855 X Position Pix 10 F Edge 2 Position Pixel 679 65662 Position Pix 11 C Edge 2 Distance Pixel 191 30754 Distance Pix 12 C Edge 2 Strength 62 00000 Score 13 C Edge 2 SNR 29 82723 Score 14 F Edge 2 Rising True Boolean C SelectAll Selected Items appears in Details Viewer Figure 10 Details of a function Building your first inspection application To build your first vision application you need an image source device Alternatively Modular X has the option to simulate this step In the following instructions a simple example application is created using the Simulate image soutce 1 Ge 2 In the Inspection Steps palette click on Acquire Images and choose Simulate Choose the images folder by clicking the path icon Click Accept when done Next you may add some image processing functions Images are often pre processed using for example Cast Image to turn it grayscale and Threshold to make it binary but it is not always necessary Now in the Inspection Step palette click on Locate Features and choose Find Edges Th
7. 15 k Customize Curves _ Initial Curves E Draw Regions to Ignore _ Draw Additional Curves a Erase Customization Pen Width 10 i l l ah a 0 Clear All Customization C view Resulting Curves Figure 55 Correct shape detection Move to Customize Scoring tab and if necessary draw regions to ignore 60 FUNCTIONS Figure 56 Draw regions to ignore if necessary 6 Finally go to Specify Match Options tab and define the Match Offset and the Match Range parameters Figure 57 Match Offset amp Position 0 0 Position 0 0 Angle 0 0 Match Range Min Angle degrees 0 0 Max Angle degrees 360 0 Min Scale 90 0 Max Scale 110 0 Figure 57 Matching parameters 7 When done save the template and close the Template Editor Important note All the tabs of the template editor must be gone through if a tab is missed this step may not work properly 8 Select or create a ROI if needed and select whether to use a Reference System 9 Fine tune the rest of the Geometric Matching parameters The tables below describe the options 61 FUNCTIONS Curve Tab Specifies the mode to use to identify the location of the curves in the image Normal Makes no assumptions about the uniformity of objects in the Extraction Mode image or the image background Uniform Regions Assumes that either the object
8. Calibration points may be chosen dynamically through other measurements 2 Select the pixel type in the image Square typical or Non Square and click Next 3 Select two calibration points and enter the value in desired units which the distance shall be understood from there on Tip for maximum accuracy use as large distance as possible Click Next when done 86 FUNCTIONS 13 Calibration Wizard Bax Ola Step 5 Specify the Pixel Ratio Select 2 points by either clicking in the image or double clicking in the list and enter the distance between the points in real world unit Points 1 User Defined 2 User Defined PREECE AEE LEC e eta pos Point 1 Point 2 es ee Corenpondence Image Real World Length oF pixels 1 Unit centimeter Figure 80 Define two points and enter the distance in real world units 4 Configure the Calibration Axis position and angle by either entering the values or drawing a line on the image Figure 81 SA Step 6 Set Calibration Axis 2 Select the Orgin of Calibration Axis and the angle a of the X axis relative to the horizontal You can draw a line in the image to specify the Orgine and X Axis Angle Axis Orgin amp Xa hn Yo o Axis Angle 0 00 degrees UU UE LLU COO T r 2 3 4 TT lt ul alo Figure 81 Set calibration axis 5 Click Accept when finished 97 FUNCTIONS User points calibration User Points Calibrat
9. Settings Operation Erode Objects Kernel Size Iteration su F gt Square Figure 32 Configure operation parameters 6 Click Accept when finished Advanced morphology Perform high level operations on particles in binary images Tasks include for example removing small particles from an image labeling particles in an image or filling holes in particles e Operations Opens the original input image Removes small objects A small object is defined by the Remove small objects number of erosions specified in Iterations needed to remove the object Removes large objects A large object is defined by the Remove large objects number of erosions specified in Iterations that do not remove the object Remove border objects Eliminates particles that touch the borders of an image Fill holes Fills holes found in a particle Holes are filled with a pixel value of 1 Convex Hull Computes the convex hull of objects Applies a succession of thinnings until the width of each object equals one pixel The Skeleton L function uses an L shaped structuring element The Skeleton M function extracts the skeleton with more dendrites The Skiz function behaves like the Skeleton M function but it affects background regions rather than object regions Skeleton 39 FUNCTIONS Separate objects Breaks narrow isthmuses and separates objects that touch Produces a labeled image using grayscale values equa
10. Source Distribution from the shortcut menu to display the Source Distribution Properties dialog box If you previously hid Build Specifications in theProject Explorer window you must display the item again to access it 1 Complete the following items on the Information page of the dialog box a Enter a name for the build specification in the Build specification name text box This name appears under Build Specifications in the Project Explorer window The name must be unique among other build specification names in the project b Enter the location for the source distribution in the Destination directory text box You can use the Browse button to navigate to and select a location c Enter a description for the build specification in the Build specification description text box 2 Complete the following items on the Source Files page a From the Project Files tree select the items you want to define as always included You also can select multiple files in the Project Files tree to add several files at one time to the Always Includedor Always Excluded listboxes 101 FUNCTIONS Click the Add Item arrow button next to the Always Included listbox to move the selected items to the Always Included listbox Click the Add Item arrow button next to the Always Excluded listbox to move the selected VIs to the Always Excluded listbox You cannot include a polymorphic VI or a LabVIEW class in the Always Included or Always Exclud
11. Clears the entire Base String Image logging Save images to local hard drive or to an FIP server 1 Select Image Logging in the Additional Tools menu 2 Choose the step that created the image Figure 117 Step that created the Image Fiel Path Acquire 1 Figure 117 Choose an image acquiring step to log Note Any processing on the image is still visible and the actual logged image depends on the position of the Image Logging step in the session and the source of the image 3 Check Enable Logging and choose whether to log to local hard drive or to FTP server Figure 118 Log to local drive Enable Logging LOS la FIP Server Figure 118 Check enable logging and choose destination 111 FUNCTIONS 4 Configure the destination details appropriately and choose the File Name method Note Pay attention to form of the Folder Path when using FTP server Figure 119 Folder Path CAIMAGEFOLDGER File Name Constant Folder Path iser Folder File Name Constant Figure 119 Folder path style in local hard drive and FTP server 5 Additionally for the file name Append Timestamp can be checked to add a timestamp of following format to the end of the file name YY MM DD HH MM SS MS 6 Configure the File Format Options Check Merge Overlay if the inspection overlays are wished to be left visible in the images Figure 120 File Format Options File Format y JPEG Fil
12. Command Format field c Choose a termination character e g NULL d Set the timeout time in ms e Output Data field displays the data that would be sent f Click Accept when done to add the write command into the Command List 75 FUNCTIONS COMI Communications Port Command Format Constant command Termination Char Timeout NULL 00 5000 Output Data Constant command ww Mormal Display O 1 Codes Display O Hex Display Comment Figure 61 Serial Output 3 Choose Serial Input to configure a read operation Figure 62 a Choose the port ID e g COM1 b Set the timeout time in ms c Choose a termination character e g NULL d Click Accept when done to add the read command into the Command List COMI Communications Port Wait Timeout Fixed Number of Bytes Termination Character MULL 00 Add Termination Char to String Comment Figure 62 Serial Input 4 Click Wait to add a delay of definable length into the Serial communication sequence 76 FUNCTIONS 5 Click Flush to order a clearing of a serial communication line into the sequence 6 The defined steps should appear in the Command List in the main Serial I O panel Figure 63 Here the elements can be dragged amp dropped and deleted Command List Port Direction Command Comment F COM1 Send Constant command COM1 Receive 00 Wait 1000 ms Figure 63 Command List 7 To
13. If F Code Equals Code Contains FF Code Read 967654371098 Figure 59 Set pass fail conditions 7 Click Accept when finished Read data matrix Read two dimensional barcodes also known as data matrices Available types of ECCs e ECC 000 e ECC 050 e ECC 080 e ECC 100 70 FUNCTIONS e ECC 140 e ECC 200 To use this function 1 Select Read Data Matrix in the Identify Parts menu 2 Give the step a name 3 Select or create a ROI if needed and select whether to use a Reference System 4 Configure the ECC parameters for proper reading Configure the Pass Inspection If parameters 6 Click Accept when finished abi IO ocr OCR function allows character text recognition from an image Objects in the area are matched to characters defined in an abc file character set file template vD 1 Select OCR in the Identify Parts menu 2 Give the step a name 3 Select or create a ROI if needed and select whether to use a Reference System 4 Use an existing character set file by clicking the folder icon or create a new one by clicking New Character Set File OCR Trainer window will open The OCR Trainer has its own help file that can be accessed by clicking Help in the window 5 When the character set file is configured properly you can move on and choose between Read and Verify Characters or just Verify Characters o Read and Verify Characters show the best m
14. Pasa ile Masks all pixels with a corresponding mask image value equal to 0 black Not Black in Image File Masks all pixels unequal to 0 non black Clips the image to the bounding rectangle of the Extract Masked Region masked area 1 In the Inspection Steps palette click on the Image Enhancement menu Bil Select Image Mask 3 Select the area by the use of these ROI controls Click on Set ROI to apply yout selected area 4 Give the Image Mask step a name Select the mask source Figure 24 Create from ROI Create from Image File C My Examples mask png Figure 24 Select the mask type 6 Select which pixels to mask and whether to extract the region Figure 25 Mask Pixels that are Black in the Image Not Black in the Image Extract Masked Region Figure 25 Select which pixels to mask 7 Click Accept when finished amp Transformations Transformations function allows applying symmetry rotation and resampling operations on the image 30 FUNCTIONS 1 Select Transformations in the Image Enhancement menu 2 Give the step a name 3 Choose the type of operation Figure 26 Settings Operation lt Image Source Symmetry Rotation Resampling Figure 26 Choosing the operation type 4 If desired define a ROI 5 Configure the parameters related to the type of operation chosen Resampling configuration options are shown below Figure
15. Signals Figure 69 Choose Acquire or Generate signals 5 Select Digital Output and then Line Output and click Next Figure 70 79 FUNCTIONS Generate Signals CH Analog Output CH Counter Oukput Digital Qutpuk T Line Output m Fort Output Figure 70 Select line output Note Port configurations can be also used Then a decimal number is given by the user in Modular X to set the physical outputs 6 10 11 12 Choose a line from any of the ports and click Next Figure 71 E Physical Supported Physical Channels Devi 056 6501 portoyline i porto lines porto lines porto lime port lines Figure 71 Choose a line Name the line Click on Finish then Save After saving the output line the Measurement and Automation Explorer can be closed Start Modular X and within the project select Digital I O in the Communication menu Give the step a name Choose Digital Input or Digital Output depending on what was created Figure 72 Figure 72 Choose between these options Select the output from the list Once selected set the port to Low High or Toggle mode Figure 73 80 FUNCTIONS Digital Output Lines Write Name Polarity R wf Low a High Digital Output Ports Toggle Write Name Constant System Inspection Status Figure 73 Select the output and set Low High or Toggle 13 Click Accept when finished Note Polarity is defin
16. Start Time oes String IF Address 192 168 0 107 String Inspection Status Pass Pass Fail Figure 76 System variables Session status Session Status step is used to configure the Session Status indicator options The indicator appearing below the Session Tree is a handy way to quickly indicate whether for example any errors were present in the inspection The Session Status can be linked to any status or logical values 1 Select Session Status in the Additional Tools menu 2 Configure according to which Step Status or Logical Result the indicator display is decided or set it to constant PASS FAIL 3 Click Accept when finished Wait Wait function adds simple delay to the session Select Wait in the Additional Tools menu Give the step a name 1 2 3 Set the delay value in ms 4 Click Accept when finished Calibrate image Calibrate Image function can be used for spatial calibration to relate pixel distances to real units or for managing image distortion 1 Select Calibrate Image in the Additional Tools menu 2 Ifa pre existing calibration is not used click New Calibration 84 FUNCTIONS 3 Name the calibration and click Next For the different types of calibrations refer to the descriptions and instructions below Simple calibration In Simple Calibration a pixel coordinate is transformed into real world coordinates by indicating a real world distance between two pixels in the image Figur
17. be handy for example in indicating step status fails in both real inspections and project debugging 10 GETTING STARTED Figure 6 Overlay Colors settings Window menu e Session Manager e Details Viewer e Full Size Ctrl Maximise window Image display user guide At top right corner of the image display are the ROI and viewing tools Viewing tools The viewing tools are always visible 11 o 9 a alolo N GETTING STARTED Zoom enables the zoom functionality of the mouse Zoom in by clicking left mouse button and zoom out by holding Shift and clicking left mouse button simultaneously Pan enables the pan functionality of the mouse Position your mouse to the start location then click and hold down the mouse button Drag the cursor to the new location ROI tools The ROI tools are visible if the currently active step uses them Ea Line tool Select a line by issuing starting and ending points clicking The line can be resized by dragging the start end point The line can be moved by clicking in the middle of the line and dragging the cursor to the new location mi Rectangle tool Select a rectangle by issuing first the initial corner and then the opposite corner of the rectangle The rectangle can be resized by clicking the lines corners and dragging to a new size The rectangle can be moved by clicking at the center and dragging La Rotated Rectangle tool The Rotate
18. can track the Session functionality If you right click on the Run Session icon you can choose from the following options 1 Run Until Any Step Fails when this Run criteria is active the Session runs until a Step Status fails e Find Edges 14 GETTING STARTED Locate Features gt gt Find Edges i Minimum Number of Edges y Pass Inspection crit Find Edges Maximum Number of Edges Number of Edges 2 Description Locates and counts intensity a Search Area transitions along a line in the Search Lines image Feature Found Result Label Results I Eh Find Edges 0 one Step Status Pass SaN Edges 2 SRO eeoe 104 82528 Edge 1 Position Pix 163 05655 a _ Edge 1 Distance Pixe 53 07850 Accept 7 Cancel M 7 Step Status indicator Pass Figure 8 Pass Inspection criteria and Step Status indicator 2 Run Until Session Status Fails in this mode the Session runs until the Session Status fails You can set the Session Status in the step called Inspection Status The Session Status indicator can be found below the Session Tree Details Viewer window Details Viewer window lists all selected results of function details system and user defined variables in real time The purpose of this window is to easily track and observe the variables during the visual inspection To open this window 1 Click on the Window menu and open Details Viewer Ctrl Shift D
19. example will demonstrate using this step with the NI USB 6501 Digital I O card Using another card should still take similar configuration Manuals of I O cards help with the setup procedure In order to use this step Modular X Digital I O plugin is required downloadable from out webpage Once you have installed the plugin follow the instructions below to set up the step 1 Connect the I O Device to the PC and open NI Measurement and Automation Explorer 2 On the configuration panel expand Devices and Interfaces the I O card should appear in the list Figure 67 2 http sanxo eu modular x 78 FUNCTIONS Configuration My System Bg Devices and Interfaces gA MI USB 6501 Dew1 C Metwork Devices MI IMAaCd Devices PXI PXI System Unidentified Fs iy Serial amp Parallel Scales l Software fy IVI Drivers 4 Remote Systems Figure 67 Devices and Interfaces 3 Right click on the device choose Data Neighbourhood and select Create New Choose Global Virtual Channel Figure 68 Create Hew Automation Expl fl Data Neighborhood nit NI DAGrix Task An NI DAGms Global Virtual Channel mE Traditional NI DAQ Virtual Channel Figure 68 Create Global Virtual Channel 4 In the following options depending on the channel direction choose either Acquire signals or Generate signals Figure 69 In this example we follow to generate output signals Acquire
20. in the Image tab of the Processing Functions palette to store an image in an empty image buffer 1 Select Image Operators in the Image Enhancement menu 2 Give the step a name 3 Select the operation type Figure 28 Image Enhancement gt gt Image Operators Step Name Image Operators 0 Operator _f Image Source Add Substract Multiply Divide And Not And Or Not OF De Exlusive Or Wot Exclusive Or Logical Diference Mask Average Min Clear if lt Clear if lt or Clear if Clear if gt or Clear if gt hl Cancel E Figure 28 Select operator 33 FUNCTIONS 4 Select whether to use a constant number or an image from Image Buffer Figure 29 Operator Exlusive Or Constant Image Buffer Content Buffer 3 used Copies 0 Figure 29 Select constant or an image from buffer 5 Set the optional Overlay visibility settings 6 Click Accept when finished H Gray filters Gray filters can be used to prepare an image for processing with certain type of actions These filters are categorized as follows e Smoothing e Edge Detection e Convolution Original input image Smoothing Low Low pass filtering smoothes images by eliminating details pass and blurring edges Smoothing Local Local averaging of the image pixels based on the kernel Average Gaussian filtering based on the kernel Attenuates the
21. in the image that are brighter than the corresponding area in the golden template e Dark Defects Searches for areas in the image that are darker than the corresponding area in the golden template template Specifies the algorithm used to resolve differences in the intensity of the inspection image compared to the intensity of the golden template e No Change Does not adjust the intensity of the golden template and the intensity inspection image e Histogram Matching Normalization Adjusts the inspection image histogram to be similar to the histogram of the golden template e Average Matching Normalization Adjusts the inspection image so the mean pixel value of the inspection image equals the mean pixel value of the golden 51 FUNCTIONS Specifies whether edges are ignored during the comparison process If enabled you can set the thickness of the edges to ignore using the Edge Thickness control Edge Thickness Specifies the thickness of the edges to ignore Threshold value for determining the minimum pixel intensity difference between the Bright Level golden template and the inspection image used for determining bright defects Threshold value for determining the minimum pizel intensity difference between the Dark Level golden template and the inspection image used for determining dark defects 7 The result can be seen in the Results window Figure 43 Results Golden Matching 0 Step Status Pass Total Def
22. relate pixels to real distances spatial calibration or remove distortion Run VI insert user created LabVIEW VPs Math insert additional arbitrary mathematical functions Logical Calculator insert logical operations combining multiple variables or results Array Operator utilise indexing of related measurements useful e g in performing series of operations with a For loop String Builder create a string from measurements Image Logging pick up and store images into HDD or FTP server Data Logging extract data into HDD or FTP server able Manage Global Variables that can be used in a variety of ways This step is used to both create and update the variables Types Numeric Boolean String Point To add a new variable 1 Zz 3 Select Set Variable in the Additional Tools menu Click Add variable Give the new variable a name choose type and insert initial value if necessary Click the green accept icon Next define what the Set Variable step actually does to the variable was it new or an existing one by choosing an Action Click Accept when finished 83 v FUNCTIONS System variables Details Viewer accessed through Window menu may also display read only System Variables Figure 76 System Variables yt Result Marne Value Result Type Current Date 2011 08 29 String Current Time 0 00000 Murmeric Device Hame DESKTOP String Device Start Date 2011 08 29 String Cewice
23. test the serial function click the Show Terminal button to bring up the Serial Communication Terminal window where the traffic can be tracked real time and click the Test button in the main panel Figure 64 COM1 Receive 400 Serial Input Wait Ja COMI Flus me uu File Edit View Project Operate Tools Window Help Command List Flush Port Direction Command COM1 Send Constant command COM1 Receive Constant command st COM1 Flush F Show Terminal O ea Normal Display Codes Display C Hex Display Test Figure 64 Serial Communication Terminal window and testing 8 Check Step fails in case of error or timeout if necessary Figure 65 Step Name My serial F Step Fails in case of error or timeout Figure 65 Step Name and Step fails in case of error or timeout Note when a measurement result is not available e g a wrong picture was taken serial output sends out NaN by default However the string is user definable Click the Options and enter a user defined string Figure 66 ei 1 0 101000 000 FUNCTIONS If a Measurement is Not Available send E Default String NaM N O User Defined String User defined string Accept 7 Cancel lt lt Figure 66 User defined string 9 Click Accept when finished Digital 1 O Digital I O step provides communication through digital I O hardware with MAX Measurement and Automation Explorer The following
24. the ROI Type Point Line Rectangle Oval etc Define the ROI either by drawing or by typing in accurate values Click Accept to save the ROI Coordinate system Create a Coordinate System into which ROPs can be linked The parameters of the Coordinate System are based on extracted measurements of definitions 1 A 2 4 5 6 Select Coordinate System in the Locate Features menu Give the step a name Choose whether to set only the vertical or the horizontal position to set both or to set the angle in addition to the position Figure 39 m TE g th 1 Find Edges berem p 2 Find Edges 0 Point 1 Origin Figure 39 Select the mode process Choose the source of the position from the Origin list Figure 40 1 Find Edges 0 Point 0 2 Find Edges O Point 1 Figure 40 Select the origin If enabled also pick the angle source from the X Axis Angle list Click Accept when finished 49 FUNCTIONS Golden matching Compare two images and return with differences This step utilises templates stored in separate files 1 Select Golden Matching in the Locate Features menu 2 Choose an existing template by clicking Select Template or create one by clicking New Template the Template Editor window shall open 3 Define an area to make the template from Figure 41 ks NI Vision Template Editor m m g File Edit Help RE Select Template Region Define Pattern Matchi
25. the curves in the template match the curves in the match region of the inspection image Score values can range from 0 to 1000 A score of 1000 indicates that all template curves have a corresponding curve in the match region of the inspection image Specifies how closely a match matches the template using a correlation metric that compares the two regions as a function of their pixel values Specifies how closely the curves in the match region of the inspection image match the curves in the template Score values can range from 0 to 1000 A score of 1000 indicates that all curves in the match region of the inspection image have a corresponding curve in the template Specifies the algorithm used by the Geometric Matching step In general you do not need to modify this setting Edge Based Works on any arbitrary shape and is guaranteed to find the object in the inspection image as long as a significant portion of the shape remains similar to the Algorithm shape of the template object Feature Based Assumes that the shape of the pattern or object in the template can be reliably represented by a set of geometric features This technique should be employed only when the objects appearance in the template and in the inspection images can be consistently and reliably represented by geometric shapes such as circles rectangles and lines 65 FUNCTIONS Specifies the search strategy used to match the template Conservative
26. the data is selected move to the Destination tab and select whether to Log to Local Drive or to Log to FIP server Configure the path and file name accordingly Figure 125 113 FUNCTIONS P Logged Destination Log to Local Drive Folder Path Figure 125 Destination tab Note Pay attention to the Folder Path format when logging to an FIP server for example PATH 5 Choose the log file type and select between Single and Multiple Data Log Files Figure 126 File Type Tab Delimited Text File toct Missing Result String Single Data Log File Multiple Data Log Files Start a New File Every Overwrite any file s crerated prior to this inspection before logging data Figure 126 Configure data log style 6 Check the overwriting option appropriately 7 Click Accept when finished 114 FEEDBACK Feedback Suggestions and Sources Feedback and Suggestions At SANXO we are continuously looking for ways to improve our services products and documentation Feel free to submit feedback and suggestion to us at info sanxo eu Thank you Sources National Instruments http www ni com IDS Imaging Development Systems GmbH http www ids imaging com 115
27. the functions to obtain images into inspection e Simulate simulates acquiring images from a camera using image files from the computer e Image Buffer stores selected images into memoty e uEye acquires images from a uEye camera device e Currera acquires images from a Currera R camera device e IMAQdx acquires images from an NI IMAQ camera device Note An Acquire Images icon is also present in its own menu simply to distinguish the menu Simulate Simulate function can be used to provide the session with images when not using a camera device The image files can be taken from any accessible storage device To simulate acquiring an image 1 In the Inspection Steps palette click on the Acquire Images menu 2 Select Simulate 3 Enter a name for the Simulate step G Choose the image path by clicking the folder icon 5 Choose between Cycle Forward Cycle Backward and Do Not Cycle options 6 Click on accept when finished Image buffer The Image buffer allows users to store acquired images into memory to be used later in the sequence or even in another Session You may for example apply Threshold to an image but buffer the original image and use it again after the Threshold 1 Select the step out of which you wish to extract the image into the buffer 2 Select Push when an image is to be stored into the buffer 26 FUNCTIONS 3 Image buffer offers 10 buffering slots numbered f
28. variations of light intensity in the neighborhood of a pixel Smoothing The Gaussian kernel has the following model a d c b x b c d Gaussian a where a b c and d are integers and x lt 1 Smoothing Median filtering Each pixel is assigned the median value of Median its neighborhood Laplacian filtering Extracts the contour of objects and outlines details The Laplacian filter kernel has the following model adcbxbcda Edge Detection Laplacian 34 FUNCTIONS where a b c and d are integers and x is greater than or equal to the sum of the absolute values of the outer coefficients Differentiation filtering Produces continuous contours by Edge Detection Pee i j i Ne highlighting each pixel where an intensity variation occurs Diff between itself and its three upper left neighbors Edge Detection Prewitt filtering A high pass filter that extracts the outer Prewitt contours of objects Edge Detection Sobel filtering A high pass filter that extracts the outer Sobel contours of objects Roberts filter to detect edges Outlines the contours that highlight pixels where an intensity variation occurs along the diagonal axes Convolution are Hishlight Dewils Convolution kernel that highlights the edges of an image Convolution Custom filtering using the kernel coefficients and size that Custom you specify Edge Detection Roberts Choose Gray Filters in the Image Enhancement menu Give the step a na
29. 00 Cu Figure 38 Filter list 7 Click Accept when finished 45 FUNCTIONS Cast image Cast Image extracts one of the following planes Red Green Blue Hue Saturation Luminance or Value from the image 1 Select Cast Image in the Image Enhancement menu 2 Choose the desired plane to be extracted 3 Click Accept when finished 46 FUNCTIONS Locate features The Locate Features palette groups several visual inspection steps with the purpose to locate objects possessing certain known features Find Edges locate edges inside a specified ROI Region of Interest Straight Edge locate straight edges inside a specified ROL Circular Edge locate circular edges inside a specified ROI Create ROI create a Region of Interest that can be used in other steps This way the ROI is stored into the memory and is not a step specific one Coordinate System place a coordinate system to allow using reference systems Golden Matching compare two images and return the differences Detect Objects locate dark or bright areas Match Pattern locate objects based on a stored pattern Match Patterns locate objects based on multiple stored patterns Match Color Pattern locate objects using a color template pattern Geometric Matching locate objects in a grayscale image based on a geometry pattern Find edges Find edges inside a ROI 1 Select Find Edges in the Locate Features menu 2 Give the step a
30. 27 Settings Operation Resampling Interpolation Type F Keep Image Ratio eee der s Resolution Y Resolution 00 s 600 Figure 27 Resampling parameters 6 Set the optional Overlay visibility settings 7 Click Accept when finished l Image operators Perform arithmetic and logical operations on images e Operators Image Opens the original input image Source P 8 P 8 mas Adds a constant or an image to the original input image This is a pixel by 31 FUNCTIONS pixel value operation Subtracts a constant or an image from the original input image This is a Subtract l pixel by pixel value operation Multiplies the original input image by a constant or another image This is a pixel by pixel value operation Multiply Divides the original input image by a constant or another image This is a pixel by pixel value operation Divide PENE Performs a logical AND operation between the original input image and a constant or another image stored in the buffer This is a bit wise operation And Performs a logical NAND operation between the original input image and a constant or another image stored in the buffer This is a bit wise operation Not And Performs a logical OR operation between the original input image and a constant or another image stored in the buffer This is a bit wise operation Performs a logical NOR operation between the original input image and a constant o
31. 5 Visible Items Find Terminal Change to Indicator Make Type Def Description and Tip Create Replace Data Operations Advanced Fit Control to Pane Scale Object with Pane Mechanical Action Switch When Pressed mE mF Properties vu a G fe a kha Le Lo m F mEt mF uf L NTL jT L Fo t Jeo tt eo tt Figure 102 Boolean control with proper mechanical action Note The Boolean control s mechanical switch should set to Switch When Pressed option otherwise the Modular X will not handle that particular switch Figure 102 3 Define the VI actions in The Block Diagram window In this example a Case Structure is used so that the two inputs are summed when they are equal and multiplied otherwise Number 1 DEL Number 2 DEL gt Figure 103 Block diagram of the example VI case False 100 FUNCTIONS Number 1 DEL Number 2 DELF Figure 104 Block diagram of the example VI case True 4 When the desired operations are defined save the VI Creating source distribution How to statt 1 Open the LabVIEW project you want to use to build the source distribution You must have a project open and saved to configure a source distribution build specification 2 Prepare the VI s you want to use to build the source distribution Save changes to any VPs in memory Configuring the Build Specification Expand My Computer Right click Build Specifications and select New
32. Character Any ASCII character User defined Uses characters you specify next to the Valid Character type selection a Z A Z Alphanumeric a Z 0 9 Uppercase Letters AZ a Lowercase Letters a7 a O Decimal Digits 09d Hexadecimal 0 9 Digits A F fe FUNCTIONS Ignores the recognized character and forces a space at the corresponding Force Space ie position 11 Configure Pass Inspection If parameters Figure 60 Pass Inspection If F Text Equals F Text Contains F Minimum Yerification Score C Minimum Classification Score Figure 60 Pass inspection criteria 12 Click Accept when finished 74 FUNCTIONS Communications Communications menu handles the I O functions of Modular X e Serial I O Serial I O communication through NI VISA e Digital I O access to digital I O hardware e User Input user interaction with the Session e Currera I O hardware access to Currera I O Serial I O Serial I O can be used for communication through a serial port It requires NI VISA driver version 3 4 1 or later The communication can be tested with a COM interface loop connection input directly connected to output 1 Select Serial I O in the Communications menu 2 Choose Serial Output to configure a write operation Figure 61 a Choose the port ID e g COM1 b Choose a variable e g a Gauge measurement to be sent by clicking Insert Result or define a constant command in the
33. Choose whether to calibrate according to the current or another image and click Next 2 Select the distortion type in question define the points and enter the corrected values Figure 86 90 FUNCTIONS Step 4 Specify Reference Points Click on the image to select a point then enter its real world coordinates in controls below Select a point in the list to modify its real world coordinates Perspective 3 A Distorsion Nonlinear Points TAES a o 1 User Defined 2 User Defined 3 User Defined _ Correnspondence Image Real World 2 Figure 86 Select distortion type and enter real world coordinates of defined points 3 Configure the Calibration Axis position and angle by either entering the values or drawing a line on the image 4 Click Accept when finished Note User Point calibration using Nonlinear Distortion has malfunction due to the feature of the original LabVIEW functions Instead we recommend to use the grid calibration to remove the nonlinearity from your image read the next session 91 FUNCTIONS Grid calibration In Grid Calibration perspective or nonlinear distortion is removed using a reference grid image Distortions are an inevitable result of the misrepresentation of three dimensional space when projected into a two dimensional surface An example of perspective distortion is illustrated below in Figure 87 Figure 87 Perspective distortion show
34. E SESS SS SS ee ee ee ee ee ee ee ee ee eee Simulate 0 Pass l TOOLS MENU I If Simulate 0 Current True l I i Jo Start 1 Pass l I i If StartCount 2 1 True l l l I l I I I i Match Pattern 0 Pass I i I If Match Pattern O Ste True I te i CoordSys 0 Pass I rr a Find Edges 0 Pass I RELET A i E Threshold 0 Pass I SESSION I A iha E I Wait 0 Pass I TREE od nay Perris fe ty 7 Status 0 Pass I si i se J I gt I IMAGE DISPLAY l I 1 p I I l I i l I I r us be y aS eee IMAGE BAR INFO l an _ a a b Session Status Pass i g 844x606 0 65X 8 bit i image o 56 596 STATUS TRAY Figure 4 User interface File menu File menu consists of file controls such as Rename Delete Save and Load Sessions and Print e New Project CTRL SHIFT N Creates a completely new project Click File and New Project Previous project will be cleared from memory e Add Session CTRL N Type the New Session Name in the popup window and click on the Create button Note that session names must be unique Maximum number of sessions is three 3 e Rename Session F2 Enter a new Session name and click Rename e Delete Session F8 Delete the current session GETTING STARTED e Save Brings up Save window where the work can be saved as a script or a project Note Project contains all the necessary files to run the inspection and Script contains the steps with constant p
35. EE EE SE E E E E E E E EEEE m o Figure 93 Corrected barrel distortion Grid Calibration step by step 1 After selecting whether to use the current image or another image choose between Perspective Distortion and Nonlinear Distortion Figure 94 95 FUNCTIONS Step 4 Specify Distorsion The template must represent a grid of circular dots with know distances between the dots O Perspective Nonlinear e tetas eeeeeer eceeoesne eeeee Seesee Figure 94 Select distortion type 2 Configure threshold settings for the grid image okey EP Calibration Wizard pee ee eS eeeeensn y a Step 5 Threshold the grid eenepee eee eee er abana Select the Threshold Range values to separate pesaaceoeeeeooe E dots of the grid From the background of the image TE E E E E E a e SPE EPR EEE ee The diameter of the dots should be 6 to 10 pixels eppee eo Pe CHB RRB RHA TE DS and the distance between dots should be around seaonpeeeoeeoeneeoenenas ee Method eooceoeu Cee rre ee ReeEe ean eee ease eeaeneenneens Dark Objects Manual Threshold oOo BPG GS EHR O o O CHR BBE RS CS Upper Yalue E E E E o O M a tt O o O RR EE BE E EE E E E E E E E yn FEEFEE PREGTGEESEEEEEDEPE M E S E E E E ee ee biti dtte nnen anh h dd tt hA E E EE EZEKET ESE SEE EE seep eeh eee ee eee eee ee e eepaeerecerpepeceee dh et eae teeeaeaeeaeeaeenre Steeseaeceonea
36. Matches 63 FUNCTIONS Specifies the order in which the detected matches are returned The following options are available Score Sorts detected matches in ascending or descending order depending on their score The match score indicates how similar a potential match is to the template image X Position Pixels Sorts detected matches in ascending or descending order of the horizontal match position in pixels Y Position Pixels Sorts detected matches in ascending or descending order of the vertical match position in pixels X Position Calibrated Sorts detected matches in ascending or descending otder of the horizontal match position in real world units Y Position Calibrated Sorts detected matches in ascending or descending otder of the vertical match position in real world units Angle Sorts detected matches in ascending or descending order depending on their angle Scale Sorts detected matches in ascending or descending order depending on their scale value Occlusion Sorts detected matches in ascending or descending order depending on the amount of the match that is occluded Template Target Curve Score Sorts detected matches in ascending or descending order depending on their template target curve score The template target cutve score specifies how closely the curves in the template match the curves in the match region of the inspection image Correlation Score Sorts detected matches in asc
37. Modular X User Guide Machine Vision Software 2013 SANXO Group We JTW Ly Smart Simple Powerful V 12 3 2013 SANXO Group All rights reserved Table of Contents LEGAL INFORMATION Legal Information of Using Modular X INTRODUCTION SANXO Innovation Oy Modular X INSTALLATION GUIDE Modular X Installation Guide Modular X Installation Modular X Uninstallation System requirements MODULAR X PLUGINS Available Plugins Plugin Installation Guide Mod lir x uEye PIUS ssrds a error sent tre rene rterr a cretrtT Modular X Digital I O Plugini eeicosescicucncsncieenanarenees GETTING STARTED User interface File Menu cc ccccccccccsccccecccsccccsccccccccuccececccuccsescececcsesceceecsenceecesecsccsceseusecees MOD E E E NN AE VANN E e E E A E E EE EE O O T R eee ere ey ee ere Window MEDU wtarnadiesarassiscncisestnntestiorsaweniincadusstervasnsiawesdedaintiacosslurensessincvawuseteinsdes Image display user guide WTS ID COIS E E POE TOO E Good to know about ROTI tool ccccccecsssssseeececeecccceceeceeeeeees Session tree right click menu Displaying images in Modular X How to run a Session Details Viewer window View details Building your first inspection application Debug Mode Getting help Examples mab mh wow WwW W N N N Jun Aa Cd PROGRAMMING TOOLS 21 The concept of building an application in Modular X Session tree Session manager Statements VISION FUNCTIONS 26 Ac
38. Uses the largest possible amount of information from the Search Strategy image at the expense of slowing down the speed of the algorithm Balanced Balances the amount of information used from the image with the speed of the algorithm Aggressive Uses a lower amount of information from the image which allows the algorithm to run quickly but at the expense of accuracy Specifies how the geometric matching function uses the contrast values of the template to identify matches Contrast Original Matches the template contrast Reversal Reversed Matches the inverse of the template contrast Both NMatches both the template contrast and the inverse of the template contrast Min Match Specifies the minimum separation distance in pixels between the origins of two Separation matches that have unique positions The step does not return matches that have the Distance same position scale and angle Min Match Specifies the minimum angular difference in degrees between two matches that have Separation unique angles The step does not return matches that have the same position scale and Angle angle Min Match Specifies the minimum difference in scale expressed as a percentage between two Separation matches that have unique scales The step does not return matches that have the same Scale position scale and angle Max Match Specifies the maximum amount of overlap expressed as a percentage allowed between Overlap the boun
39. ajor axis of the Equivalent Ellipse O Length of the minor axis of the Equivalent Ellipse O Length of the minor axis of the ellipse with the same area as the particle and Major Axis equal in length to the Max Feret Diameter e Equivalent Rect Long Side Short Side Diagonal and Short Side Feret O Longest side of the Equivalent Rect O Shortest side of the Equivalent Rect o Distance between opposite corners of the Equivalent Rect O Shortest side of the rectangle with the same area as the particle and longest side equal in length to the Max Feret Diameter e Average Horiz Segment Length Average length of a horizontal segment in the particle Sum of the horizontal segments that do not superimpose any other horizontal segment Always given as a pixel measurement e Average Vert Segment Length Average length of a vertical segment in the particle Sum of the vertical segments that do not superimpose any other vertical segment Always given as a pixel measurement e Hydraulic Radius Particle area divided by its perimeter 43 FUNCTIONS e Waddel Disk Diameter Diameter of a disk with the same area as the particle e Area Area of the particle e Holes Area Sum of the areas of each hole in the particle e Particle amp Holes Area Atrea of a particle that completely covers the image e Convex Hull Area Area of the Convex Hull of the particle e Image Area Atrea of the image e Number of Holes Num
40. at the Installation section and make sure that the ActiveX Component is checked and registered In spite of the warning message the uBye plugin is enabled but the plugin cannot be loaded We suggest closing the Modular X and reinstalling the IDS uEye Driver or remove the uEye Plugin Read Uninstallation Remove section if you want to remove the plugin Modular X Digital I O Plugin Installation 1 Unpack the downloaded file WinRaR download 2 Run setup exe 3 After finishing the installation the plugin is automatically copied to Modular X install folder 4 Restart your computer Uninstallation Remove e The installed plugin can be removed in Control Panel Program and Features e The additional National Instruments can also be removed this way Notes Troubleshoot e Digital IO Plugin works only with licensed Modular X PC version GETTING STARTED Getting started The following chapter introduces the consistent GUI and functionality of Modular X such as the various menus and the session tree User interface MENU TOOLS INSPECTION STEPS PALETTE TOOLBAR Modular X 2 1 102NQ SANXO Systems Full Version Filters o 8 File Edit Operate View Options Window Help J Sooo os os oe oe oe oe ee ee ee ee ee AE E E A E E O A O O a roarenmne J Images lt Features gt D ere A i i Default Session Value l j E serto Pass I PROGRAMMING o mm if ee ee ee ee ee ee ee ee EE SEE E
41. atching character of the character set in the Value string indicator Result scores will be given for reading percentage and for verification percentage if the character set contains the appropriate Reference characters O Verify Characters the Value string should be filled with the charactets to be checked and the character set must contain the Reference characters Only Verification Scores are obtained for the characters 6 Move on to Threshold Settings and configure the threshold parameters with the help of the Histogram graph and the table below 71 FUNCTIONS Four threshold modes are available e Fixed Range Set the lower and upper threshold limits manually This method should be used if lighting conditions are uniform in the ROI and permanent in every image Automatic threshold methods e Uniform Calculate a single threshold value for the entire ROL It is Threshold Mode recommended when the lighting is uniform in each ROI but the intensity levels may change from image to image Linear The ROI is divided into a specifiable number of blocks A threshold value is calculated for the first and the last values The algorithm then linearly interpolates values for the blocks in between This method is a good choice if the image intensity changes in space are linear Non Linear Nonlinear threshold interpolation between the specified number of blocks Dark Characters Defines whether dark characters are searched on a brigh
42. aths to the files used in the inspection e Save As Save the project to a new path and load it from the new path e Save Script CTRL S Saves the inspection as a script e Load F6 Load an mx file 4 e Import Session from Project Choose an choose a session from the list to be imported mx file saved project then e Print Window Ctrl P Print current window Edit menu Edit menu consists of Session Tree controls e Cut Ctrl X e Copy Ctrl C e Paste Ctrl V e Delete Del e View Details Ctrl D Operate menu e Undo Ctrl Z e Redo Ctrl Y e Check Session e Run Session Ctrl R View Menu e Zoom In e Zoom Out Shift Left Click when zooming tool selected e Zoom to Fit Options menu Session Tree settings in the Options menu offer some Session Tree display configuration Figure 5 GETTING STARTED Modular X Options Session Tree Settings Anto Hide Scrollbars Display Line Numbers Set Transitions Font Bold Horizontal Lines visible Hierarchy Lines visible Display Step Time Use closing Transitions Display Step Status in Session Tree None C Both Pass C Fail 5 B Undobuffer Size Settings fake affect after next run Accept SA Cancel X Figure 5 Session Tree options Overlay Colors settings in the Options menu offers to change the overlay colors and the overlay label text size Figure 6 Tip Changing the colors can
43. behaviour of the Session as the step execution time is slowed down g Default Session r Simulate r Step Data Ifi System Variable Device Name DESKTOP Straight Edges 0 Step Data Coordinate System Find Edges Step Data Detect Objects Step Data Inspection Status O Step Data h Else Inspection Status 1 Step Data Figure 14 Session Tree Session manager A Session includes every visual inspection step and transition created by the users in the Session Tree Modular X allows running three Sessions parallel at the same time 22 GETTING STARTED Clicking on Window menu Session Manager opens a window with all the existing Sessions Note that in the DEMO version the number of Sessions is limited to one and the number of steps to ten In Session manager the users can run all of their Sessions at the same time to perform this just click on the Run Sessions button Users may select different display modes and assion their Sessions to desired displays lt lt Session Manager gt gt Top Left f Default Session F Display Type Bottom Left r s H Mew Sessions k a Editor Mode Figure 15 Session manager To create a Session click on the File menu and Add Session To delete a Session before performing this operation make sure that the right Session is selected Click on the File menu and select Delete Session You can also delete a Session by pre
44. ber of holes in the particle Vision Assistant can detect holes inside a particle as small as one pixel e Number of Horiz Segments Number of horizontal segments in the particle always given as pixel measurements e Number of Vert Segments Number of horizontal segments in the particle Always given as pixel measurements Orientation Angle of the line passing through the particle center of mass with the lowest moment of inertia e Max Feret Diameter Orientation Angle of the Max Feret Diameter e Area Image Area Percentage of the particle s Area covering the Image Area e Area Particle amp Holes Area Percentage of the particle s Area in relation to its Particle amp Holes Area e Ratio of Equivalent Ellipse Axes Equivalent Ellipse Major Axis divided by Equivalent Ellipse Minor Axis e Ratio of Equivalent Rect Sides Equivalent Rect Long Side divided by Equivalent Rect Short Side e Elongation Factor Max Feret Diameter divided by Equivalent Rect Short Side Feret The more elongated the shape of a particle the higher its elongation factor e Compactness Factor Area divided by the product of Bounding Rect Width and Bounding Rect Height The compactness factor belongs to the interval 0 1 The closer the shape of a particle is to a rectangle the closer to 1 the compactness factor e Heywood Circularity Factor Perimeter divided by the circumference of a citcle with the same area The closer th
45. cept when finished The Match Color Pattern step detects the presence of an object using a color template pattern that describes the edge information and color information of the object 1 2 J Select Match Pattern in the Locate Features menu Give the step a name Select or create a ROI if needed and select whether to use a Reference System Select an existing template by clicking Select Template or create a new one by clicking New Template Draw a template region on the image Figure 50 and click OK to save the template 56 FUNCTIONS 3 Select a template in the image A Figure 50 Draw a template region on the image 6 Set up the search conditions for locating the color pattern Figure 51 Select the number of matches you expect in the image Specify whether a match can be a rotated version of the template The amount of rotation can be restricted by specifying an acceptable angle range Mirror Angles may also be given Set the minimum score that a match must reach Adjust the Search Level control to choose an appropriate search strategy The strategy is a trade off between speed and accuracy 57 FUNCTIONS Settings Number of Matches to Find Minimum Score Search Level 0 1 2 3 4 Search for Rotated Patterns 25 Angle Range degrees Mirror Angle Min degrees 25 Min degree 155 Figure 51 Search settings 7 Configure the Pas
46. d Rectangle tool enables to select a rectangle in the same manner as an ordinary one that has the option to be rotated The moving resizing features remain the same The rotating is achieved by clicking on any end of the center lines and holding and dragging to a new angle D Closed Polyline tool Select a polygon by issuing its corners as a polyline by clicking Double click in the end to close and finish the polyline Intersecting lines result in multiple selected areas The corners and the polygon can be moved by dragging Continuous Open Curve tool Draw a freehand continuous open curve by holding down the mouse button Continuous Curve tool Draw a freehand continuous closed curve by holding down the mouse button Intersecting lines result in multiple selected areas cei Ellipse tool Select an ellipse by first clicking to issue a center point and then while holding down the mouse button dragging to define the radiuses of the ellipse Hold down Shift key to create a circle The radiuses can be changed by clicking and dragging the appropriate points amp Annulus tool Select an annulus by clicking and issuing the center point and then dragging to define the outer circle of the annulus By default the diameter of the inner circle is half of the diameter of the outer circle The radiuses can be changed by clicking and dragging It is also possible to select an annular sector by dragging the end lines of the sector appearing in the ar
47. ding rectangles of two matches Compute Target Specifies whether the step should calculate the match curve to template curve score and Template return it for each match result Curve Score Display Match Games Specifies whether the step should display the match curves on the image 10 Set pass inspection criteria according the requirements 11 Click Accept when finished 66 FUNCTIONS Measure features The Measure Features palette groups steps with the purpose to extract dimensional measurements from the image The available functions are e Count pixels computes the count and percentage of Dark Bright or Gray pixels defined by a threshold in an area e Intensity extracts intensity data histogram statistics from an area e Gauge measures distance between two edges e Geometty computes geometric features based on points located in the image Count pixels Compute the count and percentage of Dark Bright or Gray pixels defined by a threshold in an area 1 Select Count Pixels in the Measure Features menu 2 Give the step a name 3 Select or create a ROI if needed and select whether to use a Reference System 4 Select whether to look for Dark Bright or Gray pixels Configure the threshold parameters o In Manual Threshold give the Lower Value if Bright or the Upper Value if Dark or both if Gray o In Automatic Threshold the step automatically specifies a threshold range corresp
48. e v a of the original image Applies logarithmic transformation on the image pixels Logarithmic PE which increases brightness and contrast in dark regions Applies an exponential transformation on the image pixels Exponential which decreases brightness and increases contrast in bright regions Reduces contrast in dark regions Similar to Exponential but Square with a more gradual effect Reduces contrast in bright regions Similar to Logarithmic Square Root but with a more gradual effect PowerX Reduces contrast in dark regions Power 1 X Reduces contrast in bright regions Select Lookup Table in the Image Enhancement menu Give the step a name Select the desired function from the function list Click Accept when finished _ a i F Basic morphology This step provides morphology tool for binary images In case of using this function on orayscale images users will be warned To use this step follow the instructions below 1 Select Basic Morphology in the Image Enhancement menu 2 Give the step a name 3 Select or create a ROI if needed and select whether to use a Reference System 4 Choose the operation type Figure 31 Operation Erode Objects Figure 31 Choose an operation 38 FUNCTIONS 5 Set the appropriate parameters i e Erode Objects connectivity can be set to square or hexagon increase choose Kernel size from 3x3 to 7x7 and the number of iterations Figure 32
49. e 77 Calibration Wizard x I Step 5 Specify the Pixel Ratio Select 7 points by either clicking in the image or double clicking in the list and enter the distance between the points in real world unit Points C O User Defined a 1 User Defined _ Selected Points ay Delete points Point 2 Point 3 x 11 x 107 Y 59 Y 54 Corenpondence Image Real World Length 96 pixels i centimeter Figure 77 Define distances between two points When a Simple Calibration is established the measurements in the inspection are displayed in the new units instead of pixels Figure 78 seee Sauge 0 Step Data Distance 2 05 cm Figure 78 Gauge measurement on the picture and the calibrated result 85 FUNCTIONS Simple Calibration step by step 1 Choose whether to calibrate according to the current or another image and click Next Figure 79 43 Calibration Wizard ax ae Step 3 Selelct Image Source D You selected Simple Calibration In future steps you ll be asked to select Z points in the image and specify the distance between these two points Use the current image if it contains 2 feature you know the distance between or acquire anew image O Use Current Image ies a eV Open Image from File 0 1 2 3 4 C Documents and Settings sanxo ax Desktop SANZO A4dam Projektek Modular X Docs pdf Figure 79 Choose image for calibration Note
50. e Interchange Format Image Quality 750 Merge Overlay Figure 120 Select format and other parameters 7 Depending on the inspection style choose to either Log All Images or Log Image Only When Session Status Fails Figure 121 O Log All Images O Log Image Only When Session Status Fails Figure 121 Choose logging condition 8 Limit the number of logged images if necessary Figure 122 112 FUNCTIONS Limit number of logged images Max Number of Images gt 100 Figure 122 Limit number of logged images 9 Click Accept when finished gt Data logging Log data to local hard drive or to an FTP server 1 Select Data Logging in the Additional tools menu 2 In the initial Measurements Logged tab select the results and variables wished to be logged Figure 123 or simply check Select AI Additional Tools gt gt Data Logging Measurements GF mulate 0 LIEF Step Status lt Current Image Path Current Image Nane Fal Parts Inspected Pass stem Variables FEE O i ge Device Start Date Device Start Time Ie Figure 123 Select measurements to be logged 3 Select the condition of the data logging Log all Measurements or Log only Measurements when Fail Session Status Figure 124 0 Logall Measurements Log only Measurements when Fail Figure 124 Select the condition 4 Once
51. e Line ROI tool is selected by default and you may draw a line inside the image borders that will be the line in which the edges are sought Experiment on the Find Edges settings and finally click Accept If the first step Simulate was left chosen the user is prompted to choose between inserting the Find Edges step before or after the current step Choose after ji Unit GETTING STARTED 7 Simply as that an application was created and it can be now run by clicking the Run Session button Ctrl R 8 Examine the results from the image and overlay from the Session Tree or from the Details Viewer Ctrl Shift D Debug Mode Advanced debugging can be done in the Debug Mode It shouldn t be confused with the simple light bulb debug button found in the session Toolbar menu The Debug Mode gives extra information when facing problems loading the project file Using Debug Mode enables locating or relocating the missing resources images calibration file OCR file etc It also gives other extra features to debug through certain steps of the application project in the Modular X Editor From the first step or from the last step where Pin Image function was set the Debug function shows all images step by step with a delay in between Highlight Time Enabling the Debug Mode 1 Open the ini file of the application executable i e Modular X Modular X int 2 Include row isDebug TRUE somewhere under
52. e Pincushion distortion e Moustache distortion 94 FUNCTIONS The following picture shows a barrel distortion Figure 92 coo eee eee eeeeene P E E O E E E ee ee E EET eovovoveeoeoe ee eee eenees eevee eocoeoeese eee eee anns esoeoocoonoceeeeeeeeeeeese escoosoescuvueoceoe eee eeeeeeee eeoeooeceooeoeeeseeeeeeeees eeeeoeeeeseeveeeeeeeeesn eeeseseeeeseeeeeeeeeees E E E E E E EEE EEE EEEE EE eseeseeseeeeoeeseeveeeeeeeeesn eeeseseseeseseseeeeeeeeees eeeeeeeeeeeeseeeeeeee0en eeeeeeeoeeeeeeeeeeenes seseeeeeeeeeeeeeeeeet e eeseeeseseeseeeeeeenenee eseeeeeeveeeeeeveeeeee seeeeeeeeeeeseenneee Sseeseseeeeceeseeeennnee i ee ee ee ee ee ert Figure 92 The calibration pattern distorted by lens Using the Grid Calibration to fix barrel distortion results in a corrected as seen in Figure 93 aqaee e pseeeseeeees sste seeds E SE SE E E E E oe E E E 6 amp E E E E E E E EEEE EEEE e eetpte oeeoeeseeeseeeeteeoereee EE SE E E E E E E E EE E E E E E E E E E E E E EEEE EEEE EEE E E E E E E E O E O O O O O O O E E E E E E E E E E E T E E E E E E L E E E E EEEE e eeeteeses 8cegenrieeeseeseetePeteneeseetees E SE E D E E E E EEEE EEE E E eseeeseeoesee eseesererteeeenseensees E E E E E E E E E E E E E E E E EEEE EEE L E E E EE
53. e shape of a particle is to a disk the closer the Heywood circularity factor to 1 e Type Factor Factor relating area to moment of inertia e Angle Degtees of rotation counterclockwise from the x axis Range 0 9 180 9 44 FUNCTIONS e Sum Moments of various orders relative to the x and y axes e Moment of Inertia Moments about the particle Center of Mass Gives a representation of the distribution of the pixels in a particle with respect to its center of gravity Shift invariant e Norm Moment of Inertia Moment of Inertia normalized with regard to the particle Area Shift and scale invariant e Hu Moment Moments derived from the Norm Moment of Inertia measurements Shift scale and rotation invariant Exclude interval specifies the range of the filter When this option is not checked the selected range is Minimum value Maximum value When this option is checked the selected range is 00 Minimum value Maximum value o0 Calibrated values the criteria can be given according to your calibrated unit cm mm etc Perimeter 1 00 Exclude Interval Calibrated alues Figure 37 Configure a filter 6 Once a filter is specified click on the Add button to apply the criteria The filter should appear in the Filter list below Figure 38 Note that it is possible to combine multiple different filters Filters Parameter Pin Plax ty Perimeter 1 000000 3 0000
54. e sutasestovadecant Identify parts Read 1D ANC ONC ces ca desiaeorinescn aces iasianesicedenasatasnassinedvasantie sonesancaacuonecenesuudnecnsteet Read data matrix cccccccccssssccccccssscccccccsccccccucsecceccuceeccccuacceccessuucececcuaseccessanes Communications Serial I O cieccccccccsccccsssccccssssccccssscccsesnccccsesceceesteccceesceceeenueceseececeeetceeeeeaneeeens TDAH TA ch OM cca esate rea E E E E E E E O memes spear eee Ocoee TT ee ee ne ee er Currer O ereer EE a EEREN EEEREN Additional tools TAE r PrN eono a E E NE SCAN CAN ALOR A TTL AOTC aerate sate casa cadena A T A TE ON i acces cesctes E E esis E ecient DAS NING acters cats encase E E E E EE MYA BOON yeaa teeta see tape vat teat cue as sett no A E E A tet FEEDBACK SUGGESTIONS AND SOURCES Feedback and Suggestions Sources INTRODUCTION Legal Information Modular X uses the National Instruments LabVIEW RT and Vision RT environments The same regulations and limitations apply to the use of Modular X as the use of LabVIEW Read the Legal Information first Legal Information of Using Modular X Terms of Use By installing Modular X you accept these Terms of Use from National Instruments Refering to web page http www ni com legal so we encourage you to review them carefully before using any part of the software In addition because NI may revise these Terms of Use from time to time by updating the homepage http www ni com legal you should
55. ea 12 GETTING STARTED Good to know about ROI tool It is possible to produce a ROI outside the image This can result that particular function with the incorrectly positioned ROI not to run and even losing your picture If you are using function or functions which are resizing the picture resample image mask transformation etc or changing the Coordinate System which is the base to the ROL then this can lead to the above mentioned problem Session tree right click menu Right clicking on a step or a transition in the session brings up a menu with special session tree functions The content of the right click menu depends on the type of the element chosen e Details Opens a window with the details related to the active step of the Session Tree e Display Result Image Mark the step to be displayed during the inspection Useful for example when the step located in a loop In normal case when the step is in a loop it will not be displayed e Pin Image Activates pin image mode e Disable Disables a step If a step is disabled it will be not executed during the inspection e Force value transitions Force TRUE or FALSE for a condition Check Session Run Session Machine vision Functions P Programming Tools p Cut Copy Delete Details Display Result Image Fin Image Disable Figure 7 Session Tree right click menu Displaying images in Modular X When user runs a session and it automatically s
56. eck of Measure Identify Additional Features Presence Features Parts Tools Acquire Images gt gt Simulate na b 8 Programming Path C Documents and Settings All Users Dokumentumok K pek Mintak epek Vizililiom jpg i Image Cycle Direction Evaluation License 19 Days Remaining Evaluate Evaluate this product Do Not Cycle Activate this product with the NI Activation Wizard Activate Purchase Purchase this product from ni com Cancel Figure 1 National Instrument Vision RT Evaluation License pop up System requirements Minimum CPU 2 GHz 32 bit x86 or 64 bit x64 processor RAM 2 GB OS Microsoft Windows XP SP3 32 bit x86 or 64 bit x64 Video memory 256 MB Hard disk space 500 MB Recommended CPU multi core 2 8 GHz or faster 32 bit x86 or 64 bit x64 processor RAM 4 GB or more OS Windows 7 32 bit x86 or 64 bit x64 Video memory 256 MB Hard disk space 1 GB INTRODUCTION Modular X Plugins The functionality of Modular X can be extended with the plugins described in this chapter If any further questions arise or a special plugin is needed please contact us at support Wsanxo eu Available Plugins 1 Modular X uEye Plugin Enables the use of IDS uEye cameras Modular X Digital I O Plugin Supports the National Instruments DIO devices NI DAQmx version 9 3 5 Plugin Installation Guide Modular X uEye Plugin Installation
57. ect Grea Pine 382 00000 Largest Defect Area Pi 210 00000 Percent Defect 3 61298 Mumber of Defects il Figure 43 Results window 8 Set the pass inspection conditions according to the requirements Figure 44 Pass Inspection If F Maximum Total Defect Area F Maximum Largest Defect Area Maximum Percent Defect F Maximum Sumber of Defects Figure 44 Pass Inspection If options 9 Click Accept when finished 92 FUNCTIONS DA N Detect objects Locate objects of homogenous intensity 1 PA 3 6 7 Match pattern Select Detect Object in the Locate Features menu Give the step a name Select or create a ROI if needed and select whether to use a Reference System In the Threshold window select whether to look for Bright Dark or Gray objects and configure the threshold parameters to fit the purpose In the Settings window configure Minimum and Maximum Object Sizes and if appropriate check Fill Holes with Objects and Ignore Objects Touching Region of Interest The Detect Object function has got its own direct filter method implemented which makes it very efficient The complete description of Particle eas the Particle Filter can be found on page 39 Set the Pass Inspection If parameters Click Accept when finished Match Pattern attempts to locate a stored known pattern within an image The matching can be configured to look for various angl
58. ed if the line is set to System Inspection Status or any other measurement result Then the polarity is chosen between Drive High if False and Drive High if True User input User Input function can used to prompt the operator with a pop up window with customised buttons 1 Select User Input in the Communications menu 2 Enter a Title for the pop up window and name the Button s Uncheck Display second button if only one button is sufficient Figure 74 ol FUNCTIONS Warning Message Would you like to test again the object under inspection First Button Same Keyboard Shortcut k Display second button Second Button Name Keyboard Shortcut x Figure 74 Configure the pop up window 3 Click Preview to see how the window appears Figure 75 Warning Figure 75 Example preview ag Currera I O vO Currera I O offers access to CURRERA R hardware inputs and outputs To use this function follow the instructions below 1 Select Currera I O in the Communications menu 2 Configure the input and output parameters for your CURRERA R device 3 Click Accept when finished For further information about CURRERA R cameras visit the Ximea webpage at http www ximea com 62 FUNCTIONS X Additio 5 Set vari nal tools Set Variable manage Global Variables of various types Session Status define Session Status indicator options Wait add delay steps Calibrate Image
59. ed listboxes Use an instance of the polymorphic VI instead From the Destinations page configure the destination options for the source distribution From the Source File Settings page click an item in the Project Files tree to display the configuration options for destination directory password options and VI settings Click the Customize VI Properties button to open the VI Properties dialog box which you can use to change VI settings such as window appearance 3 From the Additional Exclusions page uncheck the Exclude files from vi lib Exclude files from instr lib Exclude files from user lib 4 My Source Distribution Properties Information Source Files Destinations Source File Settings Advanced Pre Post Build Actions Preview Categoy Additional Exclusions Disconnect type definitions _ Remove unused polymorphic VI instances Remove unused members of project libraries Modify project library file after removing unused members _ Exclude files from vi lib T Exclude files from instr lib Exclude files from user lib T Remove compiled code Figure 105 Proper options for the Additional Exclusions Previewing and Building the Source Distribution 1 From the Preview page click the Generate Preview button to review the generated file hierarchy for the source distribution 102 FUNCTIONS 2 Click the OK button to update the build specification set
60. ending or descending order depending on their correlation score The Correlation score specifies how closely a match matches the template based on a correlation metric that compares the two regions as a function of their pixel values Target Template Curve Score Sorts detected matches in ascending or descending order depending on their target template curve score The target template curve score specifies how closely the curves in the match region of the inspection image match the curves in the template Number of Matches Number of matches the step found Found 64 FUNCTIONS Displays the following information after searching the image for the template Property Score X Position Y Position Angle Matches Scale Occlusion Template Target Curve Score Correlation Score Target Template Curve Score Advanced Options Tab Description Score of each valid match Score values can range from 0 to 1000 A scote of 1000 indicates a perfect match X coordinate of each object that matches the template Y coordinate of each object that matches the template Rotation angle in degrees of each object that matches the template at the current match location This output is valid only when you enable the Rotated control on the Settings tab The percent change in scale of the object found in the image relative to the template The amount of occlusion for each object that matches the template Specifies how closely
61. eras This Currera function acquires images from such camera 1 Select Currera in the Acquire Images menu 2 Adjust the camera settings 3 When finished click Accept For further information about CURRERA R cameras visit the Ximea webpage at http www ximea com IMAQdx IMAQdx function allows Modular X to incorporate image from cameras that are compatible with the LabVIEW NI IMAQdx driver The list of compatible cameras please can be found on the following website http sine ni com apps utf8 nipc specsPaction search amp asid 1102 Most of the cameras GigE Cameralink Firewire USB you may find in the market are compatible with the NI IMAQdx driver 1 Select IMAQdx in the Acquire Images menu 2 Select a camera device from the Camera list 3 Click on Grab then adjust your settings 4 Click Accept when finished 28 FUNCTIONS Image Enhancement It is often necessary to apply some pre processing into the image before the actual image analysis Image Enhancement functions are used to improve the analysis performance and to enable certain functions Under the Image Enhancement menu a variety of image processing algorithms to modify the pixel information can be found Image Mask masks an unnecessary part of the image Transformations applies symmetry rotation and resampling operations on the image Image Operators performs arithmetic and logical operations on the image Gray filters prepa
62. erecer ii a ee oe ee a a eo S EE m lt 5 eae an ae eee ee ee ec Figure 95 Threshold calibration pattern image 3 Configure the Calibration Axis settings 4 Click Accept when finished Note In the Calibrate Image step options it is possible to check Correct Image to visualise the corrected image Figure 96 Correct Image Interpolation Type Replace Yalue Zero Order gt oO Figure 96 Correct image For further assistance check the FAQ or contact us 96 FUNCTIONS Run VI Run VI function enables use of custom VPs Virtual Instruments from LabVIEW In many cases including a custom VI is very simple and doesn t require additional configuration When running into problems though things to go through are for example confirming the right kind of inputs and output and the right connector pane selection and special preparation if the VI contains certain SubVI s to be able to run the project file on a computer where there is no LabVIEW development version installed Correct connector pane In order to have a VI work flawlessly in Modular X the connector configuration must be properly set to 4x4x4 Note that this should be the default setting In order the set the connector pane in older versions of LabVIEW first bring out the connector button by right clicking on the VI icon and select Show Connector Error Reference source ot found then right click the connector and choose 4x4x4 from Patterns E
63. es and with definable precision 1 IA J Select Match Pattern in the Locate Features menu Give the step a name Select or create a ROI if needed and select whether to use a Reference System Choose an existing template by clicking Select Template or create a new one by clicking New Template and the Template Editor window will open Define a template region on the image Figure 45 53 FUNCTIONS File Edit Help i Select Template Region 9 Define Pattern Matching Mask Define Curves oring Specify Match Options 640x480 1X 8 bit image 160 0 0 lt Figure 45 Draw a template region 6 Go to Define Pattern Matching Mask tab and configure Template Regions to Ignore if needed Save the template Important note All the tabs of the template editor must be gone through if a tab is missed this step may not work properly 7 By default the center of the template is used as the focal point of the template You can change the location of the focal point to any position in the template Change the focal point of the template by dragging the green pointer in the template image or adjusting the Match Offset values Figure 58 Template Figure 46 Focal point of template 8 Set up the search conditions for locating the pattern Figure 47 Select the number of matches you expect in the image 54 FUNCTIONS Specify whether a match can be a rotated version of the template T
64. etry Compute geometry between measurements in the image oe Se i i Select Geometry in the Measure Features menu Give the step a name Select the type of geometry to compute Select the measurements to be used Configure the Pass Inspection parameters Click Accept when finished 68 FUNCTIONS Identify parts Certain types of objects can be identified and read via specialised functions Identify Parts palette groups visual inspection steps to read 1D and 2D barcodes and text e Read 1D barcode read 1D barcodes e Read data matrix read 2D barcodes e OCR tread characters WU Read 1D barcode Identify and read 1D barcodes Supported formats are e Codabar e Code 39 e Code 93 e Code 128 e EAN 8 e EAN 13 e Interleaved 2 of 5 e MSI e UPCA e Pharmacode e RSS Limited 1 Select Read 1D Barcode from the Identify Parts menu 2 Give the step a name 3 Select or create a ROI if needed and select whether to use a Reference System 4 Select the Barcode Type Figure 58 69 FUNCTIONS Codabar Code 39 Code 93 Code 128 EAN amp EAN 13 Interleaved Z of 5 E MSI g UPCA x Pharmacode E R55 Limited Minimal Score Add Special Characters to Code Read Add Checksum to Code Read Figure 58 Define barcode type 5 Set the Minimal Score value and check the additional features if needed 6 Configure Pass Inspection If parameters Figure 59 Pass Inspection
65. he amount of rotation can be restricted by specifying an acceptable angle range Mirror Angles may also be given Set the minimum score that a match must reach Adjust the Search Level control to choose an appropriate search strategy The strategy is a trade off between speed and accuracy Settings Number of Matches to Find gt Minimum Score gt Search Level a 0 1 2 3 4 Search for Rotated Patterns 25 Angle Range degrees Mirror Angle Min degrees 25 Min degree 155 Figure 47 Search settings 9 Set the minimum and or the maximum number of matches you expect to find Figure 48 Pass Inspection If Minimum Number of Matches X Maximum Number of Matches gt Number of Matches Figure 48 Minimum and maximum number of matches 10 Click Accept when finished 55 FUNCTIONS 1 1A 3 5 ne Match color pattern Co Match patterns Match Patterns is an extended version of the previously introduced Match Pattern step It allows looking for multiple patterns Then select Match Pattern in the Locate Features menu Give the step a name Select or create a ROI if needed and select whether to use a Reference System Select or create the templates Figure 49 and configure the locating settings Refer to the Match Pattern step help above Template Folder New Template Number ofTemplates O Figure 49 Template Folder browser Click Ac
66. he same or a different particle Connectivity 8 All adjacent pixels are considered neighbors Connectivity 4 Only pixels adjacent in the horizontal and vertical directions are considered neighbors e Square Hexagon Specifies if the pixel frame is treated as a square or hexagon during the transformation Square pixel frame Each pixel is surrounded by eight neighbors The vertical and horizontal neighbors have a distance d from the pixel Diagonal pixels have a slightly greater distance as they are farther away from the central pixel Hexagon pixel frame Each pixel is surrounded by six neighbors Each neighbor is at an equal distance from the central pixel 40 FUNCTIONS 1 Select Advanced Morphology in the Image Enhancement menu 2 Give the step a name 3 Select or create a ROI if needed and select whether to use a Reference System 4 Choose the type of operation to be executed Figure 33 Operation Remove Small Objects Figure 33 Choose an operation 5 Set the parameters ie Close Objects Iterations Square Hexagon Connectivity Figure 34 Settings Operation Remove Small Objects Iteration 2 A x Square Hexagon Connectivity 4 C Connectivity 8 Figure 34 Set kernel size iteration and other parameters 6 Click Accept when finished Invert binary image Invert Binary Image simply swaps binary image value 0 pixels to 1 and vice versa To use this function 1 Se
67. inate of the lowest point in the particle Max Feret Diameter Start X and Max Feret Diameter Start Y X and Y coordinates of the particle center the Max Feret Diameter Start Max Feret Diameter End X and Max Feret Diameter End Y X and Y coordinates of the particle center the Max Feret Diameter End Max Horiz Segment Length Left Right and Row 42 FUNCTIONS O X coordinate of the leftmost pixel in the Max Horiz Segment Always given as a pixel measurement O X coordinate of the rightmost pixel in the Max Horiz Segment Always given as a pixel measurement O Y coordinate for all of the pixels in the Max Horiz Segment Always given as a pixel measurement e Bounding Rect Width Height and Diagonal o Distance between Bounding Rect Left and Bounding Rect Right o Distance between Bounding Rect Top and Bounding Rect Bottom o Distance between opposite corners of the Bounding Rect e Perimeter Length of the outer boundary of the particle Because the boundary is comprised of discrete pixels Vision Assistant subsamples the boundary points to approximate a smoother more accurate perimeter e Convex Hull Perimeter Perimeter of the Convex Hull e Hole s Perimeter Sum of the perimeters of each hole in the particle e Max Feret Diameter Distance between the Max Feret Diameter Start and the Max Feret Diameter End e Equivalent Ellipse Major Axis Minor Axis and Minor Axis Feret O Length of the m
68. ing as parallel lines appear to converge A grid image such as in Figure 88 can be utilised to calibrate a distorted picture If one does not exist already it can be created manually Follow the points listed below for forming a proper grid pattern The displacement in x and y directions should be equal dx dy The dots should cover the entire FOV Field of View The radius of dots should be between 6 10 pixels The center to center distance between dots in the acquired image should range from 18 to 32 pixels The minimum distance between the edges of dots in the acquired image should be 6 pixels 92 FUNCTIONS CE E E E E E E E E E m l E eee E E E epee E E E E E E E E OE E E E E E E E E E E m l E E eeeseeetco eeseseeeseeteete seeepteeeseeees E E E E E E m E E LE E E E E E E E E E m m E E E E E E E E E E E E E
69. ion is a method where the reference points are defined manually It can be used to remove perspective and nonlinear distortions The image below has perspective distortion because the camera is not perpendicular to the plane of object under inspection In order to remove distortion four points in the corners of the trapezoid are defined Figure 82 Perspective distortion The coordinates of the points are now Bottom right 341 37 Top tight 269 88 FUNCTIONS Figure 83 User defined points green Perspective distortion is then removed by equalising the X coordinates of Bottom left and Top left and Bottom right and Top right points In this case the table should contain the following values The values are entered manual as shown in Figure 84 89 FUNCTIONS Step 4 Specify Reference Points Click on the image to select a point then enter its real world coordinates in controls below Select a point in the list to modify its real world coordinates Distorsion Perspective Points Delete points D User Defined l User Defined 2 User Defined a i ai Z Correnspondence Image Real World A 269 341 Y 4 i 4 M eel Unit pixels Figure 84 Image Coordinates left and Real World coordinates right The calibrated image will appear as shown below in Figure 85 Figure 85 Image when perspective distortion is removed Uset Points Calibration step by step 1
70. irection is perpendicular to the assumed straight edge Select whether to look for Best Edge or First Edge from the Look For menu Select the Edge Polarity type All Edges Dark to Bright or Bright to Dark Adjust Edge Strength Smoothing Steepness and Gap for desired performance The Edge Strength Profile graph can be utilised to help finding suitable values Configure the Pass Inspection parameters if needed Click Accept when finished edges Find circular edges in a specified ROI 1 2 3 Select Find Circular Edges in the Locate Features menu Give the step a name Select or create a ROI if needed and select whether to use a Reference System Choose between directions Outside to Inside and Inside to Outside Select whether to look for Best Edge or First Edge from the Look For menu Select the Edge Polarity type All Edges Dark to Bright or Bright to Dark Adjust Edge Strength Smoothing Steepness and Gap for desired performance The Edge Strength Profile graph can be utilised to help finding suitable values 48 D FUNCTIONS 8 Configure the Pass Inspection parameters if needed 9 Click Accept when finished Create ROI Store a ROI Region of Interest into memory The ROI can be then used in other steps It is useful for example when the exact same ROI is wished to be used in multiple different steps 1 2 3 A Select Create ROI in the Locate Features menu Select
71. ision program SANXO Innovation Oy SANXO http www sanxo eu is a growing technological company providing wide variety of Software and Hardware solutions of machine vision and automation We support our clients with complete systems or modules vision or software components depending on our customers need SANXO has close partnership with National Instruments We provide high quality services for NI product users in Instrument and Machine Control Machine Vision Sound and Vibration analysis Data Acquisition LabVIEW and TestStand developments areas Our well trained certified engineers kindly help you out in your challenging tasks Modular X Thank you for choosing Modular X This software is a powerful application for use in computer vision image analysis measurements and quality control using the Vision library functions of National Instruments LabVIEW Its modularity and the wide variety of supported functions provide you fast implementation and make it very easy to use The Modular X program package comes with a measurement sequence editor in which besides the standard tools such as locators blob edge match pattern histogram ID math geometric functions and communication tools you can use while and for loops and case structures to handle more complex cases Different shapes of ROI s Regions of Interest and many other useful functions are also available With the Executor module you can run the created sequence on a standard
72. l to Label objects the number of objects in the image plus the grayscale 0 used in the background area Assigns to each pixel a grayscale value equal to the Distance shortest distance to the border of the object which might be to a hole within the object Creates a distance map similar to the Distance function Danielsson Danielsson uses a more accurate algorithm than Distance Partitions an image into segments each centered on an Segment image object so that the segments do not overlap and leave empty zones e Mode Skeleton Specify the type of Skeleton function to perform The Skeleton L function uses an L shaped structuring element The Skeleton M function extracts the skeleton with more dendrites The Skiz function behaves like the Skeleton L function but it affects background regions rather than object regions e Structuring Element 2D array used as a binary mask to define the neighbors of a pixel The structuring element can be modified by clicking its cells If a cell is PMP green it has a value of 1 If a cell is white empty it has a value of 0 A green cell refers to a pixel being considered as a neighbor and its value is used during the morphology operation e Size Size of the structuring element Valid values include 3 x 3 5 x 5 and 7 x 7 e Iterations Specifies the number of 3 x 3 erosions to apply to the image e Connectivity 4 8 Specifies how the algorithm determines if an adjacent pixel is t
73. lect Invert Binary Image in the Image Enhancement menu 2 Give the step a name 3 Select or create a ROI if needed and select whether to use a Reference System 4 Click Accept when finished 41 FUNCTIONS Particle g p Particle filter a Particle Filter applies certain criteria to filter particles in an image 1 Select Particle Filter in the Image Enhancement menu 2 Give the step a name 3 Set the filter to either Remove Objects or Keep Objects that meet Filter Criteria Figure 45 O Remove Objects that meet Filter Criteria O Keep Objects that meet Filter Criteria Figure 35 Set the behaviour of the filter 4 Select connectivity Figure 36 a Connectivity 4 Only pixels adjacent in the horizontal and vertical directions are considered neighbours b Connectivity 8 All adjacent pixels are considered neighbours O Connectivity 4 O Connectivity amp Figure 36 Set connectivity 5 Select a filter type and assign the Min and Max values Figure 37 See the list below for a description of each filter type Center of Mass X and Center of Mass Y X and Y coordinates of the particle center of mass First Pixel X and First Pixel Y X and Y coordinates of the first pixel of the particle Bounding Rect Left Right Top and Bottom O X coordinate of the leftmost point in the particle O Y coordinate of highest point in the particle O X coordinate of the rightmost point in the particle O Y coord
74. me Define or choose a ROI if needed Select the filter type to be used Laplace Gaussian etc Set the optional Overlay visibility settings Click Accept when finished Threshold image The Threshold Image step displays different controls for gray scale and color images Choose one of the following sets of instructions based on the type of image that you want to apply threshold Ou i ae te abe ie 1 Select Threshold Image in the Image Enhancement menu 2 Give the step a name 3 The Histogram shows the range of pixel intensities in the region of interest Some of the parameters can be adjusted also from the Histogram by dragging the line s 4 Choose whether to look for Bright Dark or Gray objects Configure the threshold parameters In Manual Threshold give the Lower Value if Bright or the Upper Value if Dark or both if Gray 35 FUNCTIONS In Automatic Threshold the step automatically specifies a threshold range corresponding to the region of interest based on the type of the chosen method Use the Lower Limit and Upper Limit controls to coerce the threshold range to use a specific range of values In Local Threshold methods the step calculates threshold values for each pixel based on the statistics of surrounding pixels Use the Kernel size control to specify the approximate size of the objects to threshold Highlight Details Highlight details can be found in Gray filters Gray morpholog
75. mented characters such as in dot matrix objects Max Element 12 FUNCTIONS Max Element Set the maximum vertical spacing in pixels that can be between objects of a Spacing y character 9 With Read and Verify Characters selected the following settings are available Conservative Use extensive criteria to determine if the read characters match the trained characters Read Strategy Aggressive Use fewer criteria to determine if the read characters match the trained characters The Aggressive strategy processes images faster than the Conservative strategy Set the level of character detail for the reading Low resolution is default and is Read Solution i the fastest Medium and High resolutions use more detail but are slower By checking Aspect Ratio Dependant the allowed range of aspect ratio Aspect Ratio difference in percentages can be given Minimum value is 100 which refers to no difference Acceptance Level Define the minimum score of a match between 0 and 1000 Substitution Character Give the substitution character for unrecognised characters Default is 10 Additionally the Read Options has the feature to include definitions of Valid Character with the Use Text Pattern Check the Use Text Pattern and click Configure Text Pattern Setting Valid Characters window will open where the templates can be created The following types are available Te Valid characters for the position Any
76. name 3 Define a ROI or use a predefined one Here for example a line ROI is convenient 4 Choose whether to use a Reference System and select the appropriate coordinate system 5 Under Look For select whether to go for All Edges First Edge First amp Last Edges or Best Edge 6 Select the Edge Polarity type All Edges Dark to Bright or Bright to Dark Note In the result overlay the found Bright to Dark edges are marked in blue and Dark to Bright in red In overlay color settings they correspond to Search lines and Result fe If necessary tune the rest of the parameters Edge Strength Smoothing and Steepness to achieve good results Experimenting with different values is an efficient way to find out how each parameter affects the result 47 FUNCTIONS 8 9 E Straight o Smoothing Specifies the size of the edge detection kernel O Steepness Specifies the number of pixels averaged perpendicular to the search direction to compute the edge profile strength at each point along the region of interest Set the minimum and or maximum number of edges to be located Click Accept when finished edges Find straight edges inside a ROL 1 2i 3 8 9 Circular Select Straight Edges in the Locate Features menu Give the step a name Select or create a ROI if needed and select whether to use a Reference System Choose an appropriate Direction of the search Ideally the d
77. ncatenate 6 Once a Base String is established additional operations can be added to the String Builder Command List Note After performing an operation on the Base String the result of the operation will become the new Base String Additional operations offer various ways to automatically edit the string Available functions and their parameters are listed below e String subset Picks out a part of the string o Offset Starting position of the string 0 for beginning Oo Length Number of characters to be cut out 110 FUNCTIONS e Replace substring Inserts deletes or replaces a substring O Substring Define the insertion replacement or leave to empty constant if deleting O Offset O Length Replacing length in characters The number of characters replaced with the Substring starting from the Offset Use zero when simply inserting a substring e Search and Replace Searches for a given element in the string and replaces it with a desired new string o Regular Expression The part to be searched o Replace String The replacement string O Offset Defines the Offset point from which the search for the Regular Expression starts o Replace all Choose the Boolean value deciding whether to replace all the found expressions or simply check Replace All e Trim Whitespace Removes all ASCII white space spaces tabs carriage returns and linefeeds from the beginning and end of the string e Flush
78. ng IC Pins 20 GETTING STARTED Programming tools Elementary programming tools such as condition statements and loops can be effectively used to relate the vision functions and other actions between each other This chapter explains how the various programming elements are used in Modular X The concept of building an application in Modular X In Modular X users create Projects and Projects contain Sessions A Project may contain up to four Sessions those can be run parallel at the same time Session Session Session l il Vi Steps Steps Steps Steps and and and and Transitions Transitions Transitions Transitions Figure 12 The overall concept of a project and multiple sessions Transitions are structuring elements of the session that determine the step execution otder in the Session tree Every transition element has a start and an end tag except the Break statement 21 GETTING STARTED Session Figure 13 Example sequence in a session transitions and steps For example in While and End While While is the start tag and End While is the end tag of the transition Session tree The Session Tree Figure 14 contains the visual inspection steps and transitions programmed by the users It is a sequential tree which means that the steps are executed Q sequentially Modular X has its own debug feature that can be enabled by clicking on Debug light bulb icon When the debug mode is enabled users can track the
79. ng Mask Define Curves Customize Scoring Specify Match Options De gt z p o Q 640x480 1X 8 bit image 176 191 133 Figure 41 Draw a template region on the image 4 Go to Define Golden Template Mask tab to configure the template parameters Ignore Edge Region Edge Threshold Additional Regions to Ignore etc Figure 42 ig oh e 5 Figure 42 Found edges on the image 50 FUNCTIONS 5 Save the template and close the Template Editor window Important note All the tabs of the template editor must be gone through if a tab is missed this step may not work properly 6 Configure rest of the Golden Matching parameters Tables below describe the settings Alignment note that the actual ROI of this function is forced the same size as the template area however a reference coordinate system can be used for the position Specifies the algorithm to use to correct for slight misalignments between the golden template and inspection image The following options are available Alignment Correction e None No alignment correction e Perspective Adjusts the inspection image to correct for minor variations in alignment or perspective Settings Tab Specifies the type of defects to search for in the image e All Defects Searches for areas in the image that are brighter and or darker than Look For the corresponding arei in golden template e Bright Defects Searches for areas
80. on result by clicking the Calculate button 9 Click Accept when finished Array operator Some functions such as Detect Objects list indexed results like the areas of the found objects Array Operator offers a way to handle the indexes in a systematic manner It can be used to pick up individual results with certain indexes or to perform looping operations with indexed values with a For loop 1 Select Array Operator in the Additional tools menu If it is to be used with a For loop place it inside the loop 2 Give the step a name 3 Choose the desired measurements results from Session Item Results list Figure 113 Session Items Results Match Pattern 0 Match 96d X Position Pixel Match 96d Position Pixel C Match 3d Angle degrees Match 96d Score Figure 113 Select data you want to work on 4 In Index list in case of a For loop choose the For Cycle Index otherwise select the desired index measurement of constant b 5 Click Accept when finished The chosen indexed results are then available in the session values lists to be used in further actions Note When the For Cycle Index is chosen the measurement result index is updated every cycle according to the For loop index thus enabling convenient looped operations on the indexed results 108 FUNCTIONS Abc String builder String Builder is used to automate strings operations which can be useful f
81. onding to the region of interest based on the type of the chosen method Use the Lower Limit and Upper Limit controls to coerce the threshold range to use a specific range of values o In Local Threshold methods the step calculates threshold values for each pixel based on the statistics of surrounding pixels Use the Kernel size control to specify the approximate size of the objects to threshold 6 Configure the Pass Inspection If parameters 7 Click Accept when finished Intensity Study the intensity of an area in the image 1 Select Intensity in the Measure Features menu 2 Give the step a name 67 Z FUNCTIONS Gauge Select or create a ROI if needed and select whether to use a Reference System Configure the Pass Inspection If parameters Here by selecting an attribute the current value can be seen below which can be used to find suitable ranges Click Accept when finished Measure the distance between two edges To use this function 1 Select Gauge in the Measure Features menu 2 Give the step a name 3 Select or create a ROI if needed and select whether to use a Reference System 4 In the Settings define the type of the gauge and adjust the parameters with the help of the Edge Strength Profile graph below so that the function detects the edges properly 5 Set the Minimum and or Maximum values for the inspection pass 6 Click Accept when finished Geom
82. or a custom designed User Interface Modular X is an Open platform In case you do not find appropriate functions for analysing the image you may create your own module in LabVIEW and add it to Modular X INTRODUCTION Installation guide This part guides the user through the simple installation of Modular X Modular X Installation Guide Download link http www sanxo eu modular x download By following the link above you can download the Modular X Version PC After filling out the registration form you will receive a download link to your registered mail address Modular X Installation Unpack the downloaded rar file WinRaR download 2 Run setup exe On Windows Vista and Windows 7 use Run as Administrator option 3 The installer automatically launches the Modular X after installation in order to finish the install process 4 Restart your Computer 5 Run Modular X exe Modular X Uninstallation Control Panel Programs and Features gt Remove Modular X and National Instruments components and modules Notes Troubleshoot If you have an unlicensed version of National Instruments Vision Runtime a dialog window will appear as you select the first machine vision function This window will pop up in the background and locks the interaction with the software until being closed Figure 1 INTRODUCTION 4 Modular X 2 1 2 SANXO Systems PC Version File Edit Operate Window Help Simulate Locate Ch
83. or example in creating filenames for an image logging step The instructions below follow an example session with a Gauge function 1 Select String Builder in the Additional Tools menu 2 Give the step a name 3 The basic function in the step is the Concatenate tool with which a Base String is created by concatenating one or more elements from the session as strings Click on Concatenate and add either a Constant string or an element from the session Figure 114 In this example distance given by a Gauge function is concatenated Figure 115 T M X Concatenate Concatenate Strings String Concatenate a new String concatenate Before Base String After Base String After Index Accept 7 Cancel X Figure 114 Select an element from String control 109 FUNCTIONS Concatenate a new String String lt Constant Simulate O Step Status Simulate O Current Image Path Simulate O Current Image Name Gauge D Step Status Gauge O Distance Pixel Gauge O Point 1 Position Pixel Figure 115 Select a measurement result Note Concatenate multiple strings by clicking Concatenate a new String after having already selected one 4 When the strings are added choose where to insert the concatenated string Figure 116 Concatenate Before Base String After Base String After Index Figure 116 Choose where to insert 5 Click Accept to finish the Co
84. ora template image that may be occluded in the inspection image 62 FUNCTIONS Displays the following information after searching the image for the template Property Description Sedi Score of each valid match Score values can range from 0 to 1000 ooo A score of 1000 indicates a perfect match X Position X coordinate of each object that matches the template Y Position Y coordinate of each object that matches the template Rotation angle in degrees of each object that matches the Angle template at the current match location This output is valid only when you enable the Rotated control on the Settings tab Matches The percentage change in scale of the object found in the image relative to the template The amount of occlusion for each object that matches the Occlusion template Specifies how closely the curves in the template match the curves Template in the match region of the inspection image Score values can Target Curve range from 0 to 1000 A score of 1000 indicates that all template Score cutves have a corresponding curve in the match region of the inspection image Specifies how closely a match matches the template using a correlation metric that compares the two regions as a function of their pixel values Correlation Score Limits Tab Minimum Number of Minimum number of matches you expect the step to find Matches Maximum Number of Maximum number of matches you expect the step to find
85. ponential function exp x e PI value pi 1 3 14 pi 2 6 28 pi N 3 14 x N e Absolute value abs x Trigonometric functions are acos x e acosh x asin x asinh x e atan x atan2 x atanh x sin x e sinc x e sinh x cos x e cosh x cot x tan x e tanha 1 Select Math in the Additional Tools menu 2 Give the step a name 3 In the Manage Variables screen choose the variables needed in the math operation from the Session Numeric Values list by selecting a variable and clicking the green Add Variable button 4 Click Next when all the necessary variables are in the Selected Variables list The variable names are often long by default Give the variables Substitutional Names to be used in the formula The alias name is given by slowly double clicking in the Substitutional Name field 6 Define a formula with the alias variable names and the available operators Some basic operators can be seen below the field as buttons 105 FUNCTIONS 7 Click Accept when finished Logical calculator Logical Calculator can be used to pick up measurements and perform logical operations on them Multiple values can be used simultaneously and numeric values can be first turned Boolean through comparisons for instance 1 Select Logical Calculator in the Additional Tools menu 2 Give the step a name 3 First add measurement based results into the list by clicking Add Resul
86. quire Images BT e NE ENEE EE re ctavee santas cera A tne sea ausenctu N E T Image Enhancement PTA IS IV cece cate cake cree steele a casa E E TO EEE else haksh 6 aay 1006 0 ete re mnir nr anne try Aner E E E LBS or Sion O bloc 10 cee mn err tC ere E eee ne eee ee ee ee HA E e N cece snd ee SE E A E E A E Te o AE a a E E N ee nr E E eer a aai SAG E E T E meeestcuons a G OO e EE EE E EE E OE O A T Loo a E a A A A E E AE A E TAS IO Ea a A E A A A A E A E A Advanced Morphology aret st ceaau ceotieeetece ceratenptret onstaae vet vaeienasetabeeetseceteetovarittcpianeeeeeaceuat Favidcian a gies s creme en E rer ee te E er err teen er eee ere rnc rr eer lag iaakcliomall ican ere tT terre ee tr sere tr errr tre te te ee et SN tsar se se E E E O E E E E Locate features 47 Ea E EE A A A E AA A a tatedene ed dasteteceesuateday EA IM a A E E A coe tee ee oct rena ren ses ote O mwas essen euene sueseecsaes OT a cease watt oe ae ae E A a enelon forme seamen fee E A ues MSH SW Us sates E E son regia E as slasi ste oeupi aes E Groves A sciic Unter EE Career nT serene etre tre ar EEEE eer rere ree ee ener IM ae eee E opus cuenta catevateerseuaserni O A ME Of 0s aeria EE E A A E EREA O ENA A EAN A M a A T OT E O T WEE C10 E TE T A TE A A IVT COT yc settee sae aes nce ap ete E E O E oremionnenceets Oia FV oe eco ace E sence aula ucotatvade O Measure features 67 OL I cae cg ste E E E E stents TS TAG sap se aera E E E E T E T aus sestevatat e
87. r another image stored in the buffer This is a bit wise operation Not Or Performs an Exclusive OR XOR operation between the original input image and a constant or another image stored in the buffer This is a bit wise operation Exclusive Or Performs an Exclusive NOR XNOR operation between the original Exclusive input image and a constant or another image stored in the buffer This is a Or bit wise operation Logical Finds the logical difference between the original input image and a Difference constant or another image stored in the buffer This is a bit wise operation Replaces pixels in the original input image that correspond to pixels with value 0 in the image mask as 0 The image mask is an 8 bit image that specifies the regions in the original input image to be modified This is a pixel by pixel operation Mask Extracts the smallest value between the original input image and a constant or another image stored in the buffer This is a pixel by pixel operation n Ma Extracts the largest value between the original input image and a constant x or another image stored in the buffer This is a pixel by pixel operation 32 FUNCTIONS e Constant Use a constant value in the operation e Image Use another image in the operation Modular X allows you to only select image buffers that contain images of the same type and size as the image source Click Image Image Buffer or select Image Buffer
88. ramming tools Select Else If Select a measurement value to compare Set comparison function equal not equal etc Type in a constant value or select another measurement os oO 2s SY Click on Accept to finish While loop is a control flow statement that in Modular X allows series of steps to be executed repeatedly The sequence inside a While loop repeats until a Break is executed and then skips over to the End While Default Session Simulate 1 Step Data Match Pattern 0 Step Data lf Match Pattern O Step Status False Break End If End While Figure 20 While loop 6 m n e w a For The For loop allows repeating a series of steps under an indexing related condition The Cycle index starts from 1 and is incremented every cycle until the condition defined in the options is hit For example if the condition is defined Less than 4 the loop executes three times and the indexes are 1 2 3 If Less or Equal is used the loop would execute four times and the indexes would be 1 2 3 4 Default Session 1 a me Simulate 1 2 Step Data 3 veo Match Pattern Q 4 step Data 5 i End For Figure 21 For loop 29 Ke Ui FUNCTIONS Vision functions In the following chapter each function step of Modulat X is gone through A description of the idea as well as a step by step guide for usage is given Acquire Images Acquire Images menu contains
89. res the image so that only the information needed is extracted for processing Threshold image thresholds a grayscale image to create a binary image Highlight details uses convolution kernels to highlight the edges in the image Gray Morphology provides morphology tools for grayscale images Lookup Table affects contrast and brightness through lookup tables Basic Morphology Binary provides simply morphology tools for binary images Advanced Morphology Binary provides advanced morphology tools for binary images Invert Binary Image Binary inverts the binary values of the image Particle Filter Binary filters particles from a binary image with a specified algorithm Cast Image creates a grayscale image through a specified property plane Image mask Mask the image with a chosen image or a region of interest ROI There are different options how to define the masking e Mask type Create from ROI Uses an ROI selected as the image mask Uses an image file as image mask It should be an Create from Image File Sbit grayscale image in which the black areas are the masking areas e Mask Pixels that are Create from ROT 29 FUNCTIONS Outside the ROI Sets all pixels outside the selected region to 0 Inside the ROI Sets all pixels inside the selected region to 0 Pana Maske Region Clips the image to the bounding rectangle of the ROL e Mask Pixels that are Create from Image File Dine ta
90. revisit this page periodically to review the current Terms of Use If you do not accept these terms please do not install and use Modular X Privacy Statement Protecting your right to privacy is a priority for National Instruments and for SANXO Innovation Oy We use these guidelines in this section to safeguard the information we collect during your visit to our Web sitehttp www sanxo eu modular x Patent Information National Instruments holds patents applicable to many of its software and hardware products Please review this section to learn more about the patents that may apply to LabVIEW NI product Terms and Conditions of Sale The purchase and sale of NI hardware and software products are made under NI s standard terms and conditions of sale Please review this section for more information on these terms and conditions General Purpose Software License Agreement All NI software products are licensed under the appropriate NI software license Please click here to view a copy of NI s current general purpose Software License Agreement 1 http www sanxo eu content modular x download Legal Information html INTRODUCTION Introduction This document is a help file for the machine vision software Modular X developed and maintained by SANXO group It provides the user with a description of all the functionalities in the software and guides the user in all the way from installing the software to building a very own machine v
91. riable Engine VI Server New Environment Options Web Server General gt Silver style E Separate compiled code from source file for new Vis Internal Errors and Warnings El Do not notify of internal warnings on exit Automatically send internal warning reports to National Instruments E Close Report Sender dialog when finish sending View complete list of changes Figure 99 Uncheck the marked option for new VIs If you just modify an existing VI then you can check this function at the File VI properties Ctrl I hotkey General Separate compiled code from source file 98 FUNCTIONS MY_NUM_INPUT vi Edit Icon Current revision Location C Users DESKTOPA Desktop MY_NUM_INPUT vi Source version eR ea ot En OM en no lw Separate compiled code from source file List Unsaved Changes Revision History Figure 100 Uncheck the marked option existing VI Basic step for creating a custom VI 1 Start LabVIEW and click New VI 2 Start building the VI by inserting controllers inputs and indicators outputs in the Front Panel Modular X accepts numeric Boolean see correct action below and string inputs and outputs with the custom VPs In the following example Number 1 and Number 2 are inputs Equal is a Boolean indicator output and Result is a numeric result output of the operation Figure 101 Figure 101 Front panel of example VI 99 FUNCTIONS Boolean
92. rom 0 to 9 Choose the buffer slot to be used Figure 22 Push Store Image in Buffer O Get Retrieve Image From Buffer BuFFer Content Buffer 1 empty Copies Buffer 2 empty Copies Buffer 3 empty Copies Buffer 4 empty Copies Buffer 5 empty Copies Buffer 6 empty Copies Buffer 7 empty Copies Buffer 8 empty Copies Buffer 9 empty Copies SAR A A ee S a A n Figure 22 Image Buffer 4 Click Accept when finished The image is then stored into the appropriate buffer slot In order bring back and use the image create another Image buffer step where needed choose Get and select the desired slot Figure 23 Push Store Image in Buffer Get Retrieve Image From Buffer Figure 23 Image Buffer Get uEye Modular X supports IDS uEye camera products The uEye function acquires images from IDS uEye cameras In order to use the uEye cameras and the function install the latest driver package available for Modular X comes with the Modular X download 1 Select uEye in the Acquire Images menu 2 Select a camera from the Camera List control box 3 Configure the camera settings and Save camera parameters or Load parameters from a file 4 Click Accept when finished For further information about uEye cameras visit the IDS webpage http www ids imaging de 2I FUNCTIONS Currera Modular X also supports Ximea CURRERA R cam
93. rror Reference source not found vI Properties Edit Icon Show Connector Find All Instances Figure 97 Right click on the VI icon and select Show Connector TH Figure 98 4x4x4 VI connector scheme Note The connector Pattern does not restrict the amount of configurable inputs or outputs in the VI Note Do not connect any of your Controls or Indicators to the connector pane otherwise it will generate error This is because of different memory handling If the connector pane is empty the VI will be loaded into the memory and therefore the opening and running procedure will be much faster If the connector pane wouldn t oT FUNCTIONS empty the VI cannot be loaded to memory and opening the VI will be much slower That is the reason why Modular X requires empty connector pane Necessary steps for assuring compatibility in other PC s Before creating new VI click at the Getting started window Tools Options menu and uncheck the New and Changed New Environment Options Separate compiled code from source file for new VIs option After adjusting this setting every new VI will be compatible with Modular X Catego New and Changed New and Changed Front Panel Block Diagram New Front Panel Options Contrals Functions Palettes Environment Control Style for New Vis Search Paths Modern style Printing Source Control a one Menu Shortcuts E System style Revision Histary Security Shared Va
94. s Inspection If parameters Figure 52 Pass Inspection IF Minimum Number of Matches gt Maximum Number of Matches gt Number of Matches Figure 52 Minimum and maximum number of matches 8 Click Accept when finished 58 FUNCTIONS Geometric matching The Geometric Matching step locates regions in a grayscale image that match geometry specified in a template pattern 1 Choose Geometric Matching in the Locate Feature menu 2 Give the step a name 3 Select an existing template by clicking Select Template or create a new one by clicking New Template Template Editor window will open Figure 53 NI Vision Template Editor File Edit Help i Select Template Region Define Pattern Matching Mask 2 Define Curves P Customize Scoring 2 Specify Match Options 640x480 1X 8 bit image 161 224 450 Figure 53 Draw a template region on the image 4 Go to Define Curves tab Configure the Specify Curve Parameters Figure 54 so that the desired geometry is found in the template region Figure 55 59 FUNCTIONS File Edit E Select 91x91 2 5 Help Template Region Define Pattern Matching Mask 186 89 24 Figure 56 Define Curves Customize Scoring Specify Match Options 2 2 Specify Curve Parameters Extraction Mode Edge Threshold Edge Filter Size Minimum Length Row Search Step Size Column Search Step Size
95. s in the image or the image background consists of uniform pixel values Use this mode to calculate the external curves of objects with greater accuracy Specifies the threshold value for grayscale edge detection This value can range PEE from 0 to 255 The default value is 75 Specifies the kernel size for computing the edges in the image The following options are available Edge Filter Size e Normal e Fine Specifies the minimum length in pixels of an extracted curve The default value is Minimum Length 25 Row Search Step Specifies the number of pixels to skip in the vertical direction when searching for Size cutves The default value is 15 Column Search Step Specifies the number of pixels to skip in the horizontal direction when searching for curves The default value is 15 Settings Tab Number of Matches Specifies the number of valid matches you expect the geometric matching function to Find to return Specifies the minimum score an instance of the template can have to be considered Minimum Score a valid match This value can range from 0 to 1000 A score of 1000 indicates a perfect match Enable to look for Rotated versions of the template geometry Together with Rotated Rotated 2 ys 5a aN l Rotated 2 it is possible to define two separate angle areas Scaled When enabled the step searches for a template image that may be scaled in the inspection image Occluded When enabled the step searches f
96. ssing F8 To rename a Session press F2 or click on the file menu then Rename Session Make sute that the correct Session is selected Note A Session is selected with from the list menu above the Session Tree Figure 16 Session selector 23 GETTING STARTED Statements If The If statement evaluates a given Boolean condition and when True executes the following indented steps or when False either moves to the steps under Else if one is specified or skips entirely to the next phase after the corresponding End If IfiSystem Variable Parts Inspected gt 50 000 Find Edges 0 Step Data Ifi System Variable Parts Inspected gt 50 000 Find Edges 0 Step Data Find Edges 1 Step Data Figure 18 If statement combined with Else Configuring an If step Click on programming tools Select If Select a measurement value to compare 1 2 3 4 Seta comparison function equal not equal etc 5 Type in a constant value or select another measurement 6 Click Accept to finish Else if The If functionality can be extended by using Else If to include multiple different conditions leading to different steps and actions If System Variable Parts Inspected lt 50 000 Find Edges 0 Step Data Else Ifi User Defined Parts Inspected 52 000 Circular Edges 0 Step Data Figure 19 Else if statement 24 GETTING STARTED Configuring an Else if step Click on prog
97. structuring element by clicking its cells If a cell is WM green it has a value of 1 If a cell is white empty it has a value of 0 If a cell is green the corresponding pixel is considered to be a neighbor and its value is used during the morphology operation e Size Size of the structuring element Valid values are 3 x 3 5 x 5 and 7 x 7 e Iterations Dilate and Erode functions Number of times the operation is applied to the image 1 Select Gray Morphology in the Image Enhancement menu 2 Give the step a name 3 Select or create a ROI if needed and select whether to use a Reference System 4 Choose the desired operation to be applied 5 Set the appropriate parameters i e Close Objects increase decrease Kernel size Figure 30 Settings Operation Close Objects Kernel Size 3x3 Figure 30 Set the kernel mask size and number of iterations 6 Click Accept when finished Lookup table This step affects contrast and brightness of the image by applying a lookup table The lookup table contains values that are used to transform the grayscale values of an image Lookup table functions 37 FUNCTIONS Increases the intensity dynamic by distributing a given grayscale interval over the full grayscale interval This Equalize ans as a function redistributes pixel intensities in order to provide a linear cumulated histogram Reverse Reverses the pixel values producing a photometric negativ
98. t Figure 109 Substitutional Name Yalue eT ae En Add Result Figure 109 Add results to the list 4 All measurements were they numeric or already Boolean are turned into logical results through comparisons Select a measurement and choose whether it is compared to a constant value or another measurement The result of this comparison shall be the Boolean variable used in the Logical Calculator operations Figure 110 Tip Values of Boolean measurements like Step Status can be preserved by choosing the comparison simply Constant and TRUE 106 FUNCTIONS F Logical Calculator Add Result Select Measurement y Gauge O Distance Pixel Current Yalue 144 98825 Constant Function Value i y Greater y 144 00 O Feasurement Accept Y Cancel DG Figure 110 Select measurement and set conditions 5 Click Accept when done with one and add mote results if needed 6 Substitutional Names are automatically given but they can be changed if necessaty by slowly double clicking in the field Figure 111 Variable Name Substitutional Name Yalue Gauge D Distance Pixel 144 000 Resultl TRUE Figure 111 Results in the list 7 Define the logical relation formula using the Substitutional Names and the available operators Figure 112 107 FUNCTIONS Formula Resulti AND Result Step Status Step Mame Figure 112 Enter the formula 8 Check the calculati
99. t background or vice versa Number of Blocks Set the number of blocks used in Linear or Non Linea methods Threshold Limits Set the Lower and Upper Threshold Limits Optimize for Speed Check in case the speed of the process is more important than accuracy Perform Bi modal Calculation With Optimize for Speed Bi moda Calculation can be enabled to calculate both the lower and upper threshold levels for images that are dominated by two pixel intensity levels Advanced Threshold Settings 7 In the Preprocess Settings select whether to Ignore Objects Touching the ROI and configure Remove Particles Erosions to clear smaller objects 8 Sometimes the object segmentation requires adjusting Size Settings offer options to for segmentation Bounding Rect Width Min Max Bounding Rect ER SO Height Min Max Limit the character height in pixels Limit the character width in pixels SAAE DAE Limit the character pixel ar Min Max e character pixel area NE A ETT Set the minimum spacing in pixels between characters The value must be greater than Max Element Spacing x Set the maximum horizontal spacing in pixels that can be between objects of a character Because this value refers to the plausible spaces that a character may have the value must be less than the Min Char Spacing Set this value to a Spacing x small value usually 0 3 pixels for stroke characters and to a bigger value usually 4 7 pixels for seg
100. tallation Remove e Under your installation path default is C Program Files SANXO Modular X delete the uEye Folder in Configuration Files Devices uEye Next time you start Modular X this plugin will not be loaded e Uninstall the IDS uEye Driver in Control Panel gt Program and Features Notes Troubleshoot e If you have any suggestion or problem about this plugin please contact us at supporti sanxo cu e If you configure the camera with IDS uEye software you can use this configuration in Modular X Save camera configuration to file or to the camera EEPROM memory Modular X uses the camset2 EEPORM memory to save and load configuration files e After applying the uEye Plugin the following message appears INTRODUCTION Plugin can not be loaded because some components are missing Please check the Following sections in order to launch Modular uEye Actives panel 1 Download and apply the latest version of Modular uEye Plugin From WAAL sanso hu 2 Download the latest uEwe Software 32 64Bib From ARG fiwe ids imaging corn and make sure vou enabled the uEye Actives Component in the installer wizzard TF you have any problem please contact at support sanxo hu MOTE IF you do not want to use Modular 4 uEve Plugin delete the uEye Folder in Configuration Files Devices located at you installation Folder Figure 3 uEye plugin error Reason The installation of the uEye Driver was unsuccessful Please repe
101. tings in the project and close the dialog box The build specification name appears in the project under Build Specifications Note When you update the build specification settings the settings become part of the project However you must save the project if you want to save the settings 3 Right click the source distribution build specification name and select Build from the shortcut menu You can find the resulting source distribution in the directory specified in the Destination directory on the Information page of the build specification Insert a custom VI in Modular X 1 Select Run VI in the Additional Tools menu 2 Give the step a name in the bottom left corner field 3 Click VI Path to Run Figure 106 select the desired VI and click Next 13 Modular X 2 1 2 SANXO Systems Full Version File Edit Operate Window Help Proce Acquire Image Locate Check of Measure Identify Run YI ja ing Images Enhancement Features Presence Features Parts pols Additional Tools gt gt Run VI Select VI to Run aa I Path to Run Connector Pane Pattern HE Step Name Logic YI Fun Cancel Figure 106 Browse VI Path 4 In the following screen configure the VI inputs to Constants or Measurements Figure 107 Click Next when the inputs are properly set 103 x FUNCTIONS Additional Tools gt gt Run VI Manage Controls YI Controls vf Keep Value En Yalue Source Set to Constant Number 2
102. tops as there are no infinite loops in the Session Tree the image displayed is given by the last step In case it is wished to use loops and track the behaviour of step inside Display Result Image marking is used 13 GETTING STARTED Display Result Image is found in the Right Click menu of the Session Tree When activated the step will then provide visualisation even when in loop It is important to note that while editing the Session the images are displayed according to the transitions used before the current selected step It allows the user to click on a step editing the Session and get the correct or expected image Because this procedure is always executed when users select a step calculates the conditions in the Session Tree it may take a long time and to reduce this time a function called Pin Image can be used This function is activated by right clicking on a step that provides an image and selecting Pin Image Note if Pin Image is activated and users modify their Session before that step that has this function activated changes will not take effect until they disable Pin Image function and run their session or click on a step with Pin Image function is disabled How to run a Session In order to run a Session click on the Run Session button in the Toolbar There is a possibility to debug your Session click on the debug icon for debugging In this case the Session will be executed slower than in normal run mode so users
103. y Gray morphology affects the structure of objects in grayscale images Expanding or reducing objects filling holes closing particles or smoothing boundaries are tasks that can be performed to delineate objects and prepare images for example for thresholding and quantitative analysis e Operations Grayscale dilation operation Dilation increases the Dilate brightness of each pixel surrounded by neighbors with a higher intensity Grayscale erosion operation Erosion reduces the brightness Erode of pixels that are surrounded by neighbors with a lower intensity Grayscale dilation followed by grayscale erosion Closing Close removes dark spots isolated in bright regions and smoothes boundaries Grayscale erosion followed by a grayscale dilation Opening Open removes bright spots isolated in dark regions and smoothes boundaries Finite and dual combination of closing and opening Proper Close operations Proper Closing removes dark pixels isolated in bright regions and smoothes the boundaries of dark regions Finite and dual combination of opening and closing Proper Open operations Proper Opening removes bright pixels isolated in dark regions and smoothes the boundaries of bright regions Auto Median Dual combinations of openings and closings Auto Median generates simpler objects with fewer details e Structuring Element 36 FUNCTIONS 2D array used as a binary mask to define the neighbors of a pixel You can modify the
Download Pdf Manuals
Related Search
Related Contents
USER MANUAL Printer Friendly pdf LogiLink AA0059 screen protector 5054414A_Ixengo L.indd - Peterhans Le SIGMA SD14 Unique. Novateur. Son capteur tri PDFファイル - 医薬品医療機器総合機構 IC-207H - ICOM Canada P INT SPY INT P SPY Copyright © All rights reserved.
Failed to retrieve file