Note: If edge detection changes are made while an image tool command is being modified, the changes will be applied to the command. Additionally, pressing the Apply to all selected commands button will apply the current Edge Threshold to all selected Program Operations.
The Teach Edge command displays a window called the Threshold Graph that looks something like this:
The Threshold Graph displays the edge strength value at each pixel.
• The width of the graph corresponds to the length of the Image Tool; that is, the number of pixels covered by the Image Tool is mapped into the fixed width of the Threshold Graph.
• The highest spike in the graph is called the Edge Strength - it represents the largest transition in grayscale value within the image area under the Image Tool.
• The blue horizontal line is the Upper Edge Threshold - the minimum transition from black-to-white in grayscale value that signifies an edge.
• The bronze horizontal line is the Lower Edge Threshold - the minimum transition from white-to-black in grayscale value that signifies an edge.
• The green vertical lines represent the detected edges - the transition points under the Image Tool that exceed the upper or lower edge threshold.
• The red vertical line represents the measured edge - the detected edge that satisfies the polarity and threshold requirements. This is the point that is returned when the tool is executed.
• The top half of the graph represents edges found with Black-to-White Polarity. Edges found with this polarity will appear as spikes in the top half of the Threshold Graph.
• The bottom half of the graph represents edges found with White-to-Black Polarity. Edges found with this polarity will appear as spikes in the bottom half of the Threshold Graph.
|
Step |
Action |
|
1 |
From the Vision Ribbon Tab Select Vision > Tool Options > Teach Edge The Teach Edge dialog appears. Here's a sample: The current image tool is displayed in the Image Window. The Edge Strength is automatically calculated and displayed in the Edge Strength box. Adjusting the Zoom slider will magnify the Threshold Graph. This can be useful when the edge strength is small. NOTE: You can resize the Teach Edge dialog. When resized, the Threshold Graph is automatically scaled to fit in the plot area on the window. This can be useful if there are multiple edges and the dialog is expanded horizontally - the edges will be plotted much wider and farther apart, making them easier to distinguish. |
|
2 |
Position and rotate the Image Tool so that it crosses the edge to be scanned. Here's an example: The Threshold Graph updates as the Image Tool moves across the image. Rotate the Image Tool so that the scan direction arrow points in the appropriate direction for the current Edge Detection Polarity setting. |
|
3 |
Drag the Upper and Lower Threshold lines up and down to set the Edge Threshold values. The values are displayed in the corresponding Threshold text boxes. You can also change the Upper and Lower Threshold values by manually entering the values in the corresponding text boxes. Alternatively, click the Auto Threshold button. The Edge Threshold values are set to one-fourth of the Edge Strength value. |
|
4 |
Select the appropriate Polarity and Scan Direction settings. The Threshold Graph will update when these settings are changed to indicate which edges are detected (green) and which point will be returned when the tool is executed (red). If User Pick polarity is selected, clicking on any of the green edges in the Threshold Graph will choose it as the measured edge and the line will turn red. |
|
5 |
If the new edge settings need to be applied to a command that has already been created in the program, select the commands you would like to update in the Program Database and click the "Apply to all selected commands" button. This will apply all settings, including the upper and lower threshold values, polarity, and scan direction, to the selected commands. |
| Type | Method | How It Works |
|---|---|---|
| Optical | Switch to Backlighting | Places the light behind the part, creating a stark black silhouette against a white background. This maximizes contrast and completely eliminates surface reflections. |
| Optical | Use Low-Angle Ring/Darkfield Lighting | Casts light nearly parallel to the part surface. It emphasizes height changes (edges) by reflecting light away from the camera everywhere except at the edge. |
| Optical | Add a Color Filter | Using a colored light (or lens filter) that matches the part color will make the part look bright white to a monochrome camera, while a contrasting background will look dark. |
| Software | Lower the Threshold | Forces the software to accept smaller intensity transitions as valid edges. |
| Software | Switch to Directional Detection (Polarity) | Restrict the edge search tool to look only for transitions going from dark-to-light (or vice versa) to ignore unwanted secondary edges. |