Detect Straight Edges in Grayscale Images
Note The Straight Edge (Rake) function works only with 8-bit images. |
Main Tab
- In the Step Name control, enter a descriptive name for the step.
- Verify that the Reposition Region of Interest option is enabled if you want to link the region of interest specified in this step to a previously defined coordinate system.
Link the region of interest to a coordinate system if the position of the object under inspection changes from image to image, and you need to adjust the position of the region of interest to match the new location of the object.
Settings Tab
- Select the appropriate ROI tool.
- Draw a region of interest that includes the straight edge you want to find.
When you specify a region of interest, the step automatically tries to locate a straight edge in the region. If the automatically located edge corresponds to the edge you expected to find, click OK to close the Parameter window and add the step to the script. Otherwise, go to the next step.
- Disable Auto Setup and manually adjust the edge location parameters.
- Select the direction properties of the search lines. Select a search line orientation that is perpendicular to the edge.
Also, select the search direction along the line that has the least number of obstacles between the edge of the region and the object edge you want to find.
- If the Edge Strength Profile contains a strong peak that corresponds to the edge you want to find, adjust the yellow edge strength line so that it lies slightly below the top of the edge peak but above all of the other peaks.
If the Edge Strength Profile does not contain a strong edge peak, adjust the Smoothing and Steepness controls until a peak appears.
If the step still cannot find the edge or the location of the detected edge is inaccurate, adjust the Gap between the search lines until you achieve the expected result.
- Select the direction properties of the search lines. Select a search line orientation that is perpendicular to the edge.
Tip You can modify and move the ROI using context sensitivity. Click the ROI and move the contours as necessary. You also can select the complete ROI by clicking the middle of the ROI and dragging it. |