Detect a Straight Edge

NI Vision Assistant

Detect a Straight Edge

Main Tab

  1. In the Step Name control, enter a descriptive name for the step.
  2. 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.

Edge Detector Settings Tab

  1. Select the detection method and direction properties of the search lines. Select a search line orientation that is perpendicular to the edge. For example, the orientation of the edge in the following figure is vertical. Therefore, the search lines are horizontal.

    Also, select the search direction along the lines that has the least number of obstacles between the edge of the region and the object edge you want to find. In the following figure, the search direction is right to left so that the step avoids detecting the edges of miscellaneous objects.

    1  Edge to Locate   3  Search Lines  
    2  Search Region   4  Miscellaneous Objects in the Image  
  2. If the step does not locate the correct edge, disable the Suggest Values control, and adjust the blue 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 edge detection 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.

Straight Edge Settings Tab

  1. In the Straight Edges Requested control, set the number of edges you want to find in the image.
  2. If necessary, disable the Suggest Values control and use the other controls on the Edge Settings tab to specify additional criteria for determining edges.

Results Tab

  1. Set the limits that correspond to the specifications of the edges you want to find in the image.
  2. Click OK to add the step to the inspection.