Presentation is loading. Please wait.

Presentation is loading. Please wait.

Label Light Exercise. Introduction to Scorpion - Demo 1- Label on Syringe Page 2 Profiles related to the exercise When starting use profile: Label_Light_Start.

Similar presentations


Presentation on theme: "Label Light Exercise. Introduction to Scorpion - Demo 1- Label on Syringe Page 2 Profiles related to the exercise When starting use profile: Label_Light_Start."— Presentation transcript:

1 Label Light Exercise

2 Introduction to Scorpion - Demo 1- Label on Syringe Page 2 Profiles related to the exercise When starting use profile: Label_Light_Start The fully completed profile: Label_Light_Final

3 Introduction to Scorpion - Demo 1- Label on Syringe Page 3 Objectives To solve a complex vision task using the following fuctions: Scorpion reference system Intensity Tool LineEdgeFinder and LineEdgeCaliper Tools Constructing lines between points/lines Make a simple Phyton script

4 Introduction to Scorpion - Demo 1- Label on Syringe Page 4 Task - Label Measure –Label position on syringe Resolution 1/100 mm Tolerance 5/100 mm Check –Position is between 3.6 and 3.85 mm.

5 Introduction to Scorpion - Demo 1- Label on Syringe Page 5 Setup Image shows syringe with label. The syringe is illuminated with a diffuse lighting with a dark background. This reduces reflections and ensures edge contrasts. To measure the label position it is necessary to constructs a reference line defined by the two edgepoints where the syringe starts to get smaller. The image is captured with an industrial Sony b/w camera XC-75, 760 x 570 pixels and 256 gray levels

6 Introduction to Scorpion - Demo 1- Label on Syringe Page 6 Scorpion in Operation This exercise is a part of the comprehensive Label demo profile The picture show the final user interface This exercise will focus on the vision task only Please read and investigate the complete demo at a later stage

7 Introduction to Scorpion - Demo 1- Label on Syringe Page 7 Label block diagram

8 Introduction to Scorpion - Demo 1- Label on Syringe Page 8 Creating MyLabel_Light profile Restore profile Label_Light_Start.zip Create a new profile and give it a name i.e. MyLabel_Light Copy thye Label_Light_Start profile to the new one

9 Introduction to Scorpion - Demo 1- Label on Syringe Page 9 Creating the Reference System Activate Service.Toolbox.New to create MMReference of ScaleReference type Set x and y scale to 24.8 Active Results tab –Set unit for pixel resolution to mm by using the popup menu Note that an image must be captured for Results.pixel resolution to be defined

10 Introduction to Scorpion - Demo 1- Label on Syringe Page 10 Defining the reference system With Scorpion reference systems are defined with a family reference tools. In the label case MMReference of type ScaleReference is used to transform pixels to mm. With x and y scale of 24.8 the pixel resolution is 0.04 mm Check MMReference.Results The scalefactor was defined by using a ruler.

11 Introduction to Scorpion - Demo 1- Label on Syringe Page 11 Remmber to Backup of profile Activate Service.Maintenance Press Backup –Add comment –Press OK Hint : Profile Backup ensures simple restore of a working profile

12 Introduction to Scorpion - Demo 1- Label on Syringe Page 12 Locate syringe The following steps are performed to locate the syringe: Calculates blob threshold with Lightmeter Finds course location of syringe with blob - FindSyringe Establishes SyringeReference using three edge finders: –Left Edge –Upper Left Edge and Upper Right Edge

13 Introduction to Scorpion - Demo 1- Label on Syringe Page 13 Locate Syringe - LightMeter Activate Service.Toolbox Create LightMeter – IntensityTool. Set MMReference as reference. Using LightMeter an adaptive threshold for the blob Find Syringe is calculated. The LightMeter ROI is defined in a narrow band across the syringe. The LightMeter’s 70 % percentil is a good candidate for the Find Syringe threshold. Using this threshold makes Find Syringe robust to light variations. The LightMeter’s ROI is in a narrow band across the syringe.

14 Introduction to Scorpion - Demo 1- Label on Syringe Page 14 Find Syringe Create Find Syringe – BlobTool. Set MMReference as reference. Find Syringe requires that the light area of the syringe is greater than 10 mm2. The ROI is around the syringe. The size defines how large variation in syringe position the system can tolerate. Hint : All values are in mm. This is defined by the reference MMReference

15 Introduction to Scorpion - Demo 1- Label on Syringe Page 15 Verify – Find Syringe Verify –Press Start Check that Blob locates syringe on all images –Press Stop to terminate Activate Find Syringe.Visualization –Turn off all elements except MaxContour and Center Of Gravity Turn off Show graphics on LightMeter.Visualization Hint : A tool can be examined in detail using Visualization – this only

16 Introduction to Scorpion - Demo 1- Label on Syringe Page 16 State – Syringe Present Create the Lag logic state Syringe Present - LogicTool Open Syringe Present and activate the Setup tab. Add a new condition pressing New Set Find Syringe.Total blob area greater than 40 mm2. Set Syringe Present to false if condition is undefined. In this case this means that Find Syringe has failed.

17 Introduction to Scorpion - Demo 1- Label on Syringe Page 17 Locate Syringe Using edge finders the upper left edges of the syringe is located. The following edge finder – LineEdgeFinderTool is used: Find Left Edge Find Upper Left Edge Find Upper Right Edge Tracecomb Find Upper Left Edge

18 Introduction to Scorpion - Demo 1- Label on Syringe Page 18 Setup Find Left Edge Create a tool – LineEdgeFinderTool named Find Left Edge Set Find Syringe as reference –Press Apply –Turn on visualizations – trace lines –Activate Show Info – Image Menu Position mouse at left edge to find center of ROI Hint – All values are in mm

19 Introduction to Scorpion - Demo 1- Label on Syringe Page 19 Advances setup LineEdgeFinderTool Differentiation = 1 –This means that seek peaks where the derivative is at it’s maximum. This is robust and handles light variations. Smooth base and counter = 4 and 2 –Means that the trace combs is filtered to remove noise Fit-tolerance = 0,08 –This means that all points used in the curve fitting is in a band of 0.08 mm – approx 2 pixels Good-fraction = 12 points –This means that more than 12 of the trace combs has edges for the fitted line to be accepted

20 Introduction to Scorpion - Demo 1- Label on Syringe Page 20 Verify Find Left Edge Activate Find Left Edge.Results Hint : Press Start and run live inspections – the results are updated continuously Check the Gradient against Setup.Threshold –Gradient should be minimum 1.5 – 2 time the threshold Line-fit 0.0247 means that the points on the calculated line has a noise approximately half a pixel –The edgeline has a greater accuracy than half a pixel –The LineEdgeFinderTool has sub-pixel resolution

21 Introduction to Scorpion - Demo 1- Label on Syringe Page 21 Find Upper Right Edge Activate Service.Toolbox Select Find Left Edge Open mouse menu –Press Copy Open mouse menu –Press Paste Select Copy of Find Left Edge Name Find Upper Right Edge Select Find Upper Right Edge –Press Edit Move Find Upper Right Edge ROI to the right side of the syringe – see image –Remember to rotate trace comb

22 Introduction to Scorpion - Demo 1- Label on Syringe Page 22 Finn Upper Left Edge Activate Service.Toolbox Select Find Upper Right Edge Open mouse menu –Press Copy Open mouse menu –Press Paste Select Copy of Find Upper Right Edge Name Find Upper Left Edge Select Find Upper Left Edge –Press Edit –Move ROI to left side of syringe

23 Introduction to Scorpion - Demo 1- Label on Syringe Page 23 Locate – Reference Line Create Reference Line - LineFromPoints Reference Line is defined by the Find Upper Left and Find Upper Right Edge center points.

24 Introduction to Scorpion - Demo 1- Label on Syringe Page 24 Locate – Syringe Reference Create Syringe Reference – PointLineReference Set the reference to MMReference Reference Line and Find Left Edge defines a reference system that handles syringe rotation and translation. The rest of the image analysis benefits from this. It is important that Reference Line is defined as the first tool in PointLineReference because the first points handles rotation.

25 Introduction to Scorpion - Demo 1- Label on Syringe Page 25 Syringe Width Create Syringe Width- LineEdgeCaliper –Purpose measure width of syringe in mm LineEdgeCaliper has two trace combs – see image. Select Syringe Reference as reference. Using Syringe Reference means that the tool is relatively positioned and all parameters and results are in mm inherited from MMReference. Set Trace line start and end point to 2 and 6 – remember to set the angle and threshold Remember to set fit-tolerance in mm. A good starting point is 0.04 mm – equal to the pixel size. Set number of trace lines to 21 Set unit and precision of the width and line fit results to mm and two and four decimals. Nominal width is 8.90 mm

26 Introduction to Scorpion - Demo 1- Label on Syringe Page 26 Measure label position Using two edge finders the left edge and the left slope edge is found. The intersection of these lines defines where the syringe bends. The same applies to the right side of the syringe. The two bends points is used to construct a Label Reference Line. Using a blob Find Marker and an edge finder the upper edge of the upper marker is located precisely. The label position is defined as the distance between the Label Reference Line and the Upper Marker Edge. The distance is classified and is presented in mm i the state panel.

27 Introduction to Scorpion - Demo 1- Label on Syringe Page 27 Find Left Slope Create Find Left Slope – LineEdgeFinderTool Make a copy of Find Left Edge Paste Find Left Slope Select Find Left Slope Set Syringe Reference as reference Activate image menu Show Info Set ROI center and correct angle Hint : By activating Visualization.Tracelines one can see where the trace comb hits the edge

28 Introduction to Scorpion - Demo 1- Label on Syringe Page 28 Find Lower Left Edge Create Find Lower Left Edge – LineEdgeFinderTool Copy Find Left Slope Paste Find Lower Left Edge Select Find Lower Left Edge Activate image menu Show Info Set new roi center and correct angle Hint – Gradient is lower on this edge and threshold must be lower on this tool. The edge detection can be improved by smoothing or increasing the number of trace lines.

29 Introduction to Scorpion - Demo 1- Label on Syringe Page 29 Right side edgefinders The easiest way to configure Find Right Slope and Find Lower Right Edge is to copy the corresponding left edge finders After copying –Change ROI Center and angle –Turn on trace line visualization to see where the trace comb is located –Verify edge polarity and threshold Hint – When moving a copied tool it is very convenient to activate Visualization.this only

30 Introduction to Scorpion - Demo 1- Label on Syringe Page 30 Verify edgefinders Press Start –Verify that the edge finders located all edge for all test images –On failure Verify threshold and position The number of trace lines increases the image processing time but also the probability to locate an edge Hint : By stopping the continuous inspection it is possible to select images from the history list and reprocess interactively until the edges are located. By pressing Inspection image processing is performed on user request.

31 Introduction to Scorpion - Demo 1- Label on Syringe Page 31 Construct intersections Create Left intersection – PointFromLines. Select Find Left Slope.Line and Find Lower Left Edge.Line Copy Left Intersection Paste Right Intersection Select Find Right Slope.Line and Find Lower Right Edge.Line

32 Introduction to Scorpion - Demo 1- Label on Syringe Page 32 Marker Reference Line Create Marker Reference Line using LineFromPoints Select Right Intersection and Left Intersection as points The constructed line defines a zero position for the marker label. The Marker Reference Line has to be constructed. It is not possible to measure due to missing contrast and varying reflection from the syringe.

33 Introduction to Scorpion - Demo 1- Label on Syringe Page 33 Locate label marker The next step is to locate the label marker. This is done by using a Marker LightMeter and the blob Find Marker. The blob threshold is set dynamically using a python script.

34 Introduction to Scorpion - Demo 1- Label on Syringe Page 34 Marker LightMeter Create Marker LightMeter of type IntensityTool. Set the reference to Syringe Reference. Press Apply. Active Marker LightMeter.Visualization.this only Activate Image.Show Info to set the center of the lightmeter roi. Verify that the lightmeter roi is placed on the syringe and handles both syringe rotation and translation.

35 Introduction to Scorpion - Demo 1- Label on Syringe Page 35 Find Marker Threshold Create Find Marker Threshold of type PythonScript The Find Marker blob’s dynamic threshold is calculated using the following script: min = GetTagValue('Marker LightMeter.Min'); #LightMeter.Min is a result of Marker LightMeter SetTagValue('Find Marker Threshold.Value',min+25) #Sets the threshold to itself Hint : Activate Parameters The parameter dialog is available to find the name of the results in the Scorpion tag database.

36 Introduction to Scorpion - Demo 1- Label on Syringe Page 36 Find Marker Create Find Marker of BlobTool Set reference to Syringe Reference Set the roi equal to Marker LightMeter Set Area Search - thresholds Minimum = 0 Maximum = Find Marker Threshold.Value Set minimum area to 0.2 mm2 Verify that the marker is found for all images by pressing Start.

37 Introduction to Scorpion - Demo 1- Label on Syringe Page 37 Find Marker Upper Edge Create Find Marker Upper Edge – LineEdgeFinderTool Copy Find Lower Right Edge Paste Find Marker Upper Edge Set reference to Find Marker Set roi x and y to zero. Activate Visualization.Show Graphics Use Image.Show Info to select position and correct angle Adjust and verify threshold for all test images Verify that the upper edge is found by pressing Start. Hint : Increase smooth base and count if the edge of the label is detected.

38 Introduction to Scorpion - Demo 1- Label on Syringe Page 38 Marker Distance Create Marker Distance – NearestPointOnLine Set reference to MMReferanse Select Find Marker Upper Edge.Center to point and select Marker Reference Line.Line to line. The marker distance is equal to the Marker Distance.Distance result. The dimension is in mm given by the MMReference reference tool. Set the unit and the precision for the Marker Distance.Distance result.

39 Introduction to Scorpion - Demo 1- Label on Syringe Page 39 Display distance in State Panel Activate State Panel Menu –Select General.No of measured values –Set No of measured values to 1 –Set General.caption = State Activate menu by clicking the value –Select Measured Value.Title = Distance –Select Measured Value.Parameter = Marker Distance.Distance –Select Measured Value.Decimals = 2 –Select Measured Value.Unit = mm Set font Condition to size=20 and bold

40 Introduction to Scorpion - Demo 1- Label on Syringe Page 40 Operation.Results Active Operation.Results Press New and select a set of parameters To the right a selection of parameters are shown

41 Introduction to Scorpion - Demo 1- Label on Syringe Page 41 Operation.Curves All results can be graphed and watched To the right the Marker Distance is displayed Activate the Curve Menu and select parameter –The curve configuration is changed by double clicking the curve. Hint : The curve can only be edited in service mode. Hint 2 : Watch the inspection cycle time is a good way to check the system condition

42 Introduction to Scorpion - Demo 1- Label on Syringe Page 42 Curve Setup – Marker Distance Hint : By capturing N images of a syringe one can establish an estimate for the noise level of measurement by recording the standard deviation

43 Introduction to Scorpion - Demo 1- Label on Syringe Page 43 Exercise summary Scorpion solved this task by using it’s robust and good edge tools. The edges where detected with a sub-pixel resolution of 5 micrometer. The lines detected are intermediate results but ensures that the label position is measured with at 3 sigma tolerance better than 0.06 mm – this is very good. This means that the customer’s expectations are met without any programming.

44 Introduction to Scorpion - Demo 1- Label on Syringe Page 44


Download ppt "Label Light Exercise. Introduction to Scorpion - Demo 1- Label on Syringe Page 2 Profiles related to the exercise When starting use profile: Label_Light_Start."

Similar presentations


Ads by Google