Adv. Straight Edge Controls

NI Vision Builder

Locate Features Tab

Adv. Straight Edge Controls

Main Tab

The following controls are available on the Main tab.

Control Name Description
Step Name Name to give the step.
Region of Interest The region of interest you want to use for the step.
Reposition Region of Interest When enabled, the step dynamically repositions the region of interest based on a coordinate system you built in a previous step.
Reference Coordinate System Coordinate system to which you want to link the region of interest.

Edge Detector Settings Tab

The following controls are available on the Edge Detector Settings tab.

Control Name Description
Suggest Values When enabled, the step suggests appropriate values for the Edge Detector controls.
Detection Method Specifies the method to use to find the straight edge. The following options are available:
  • First Edge Rake—Fits a straight edge on the first points detected using a Rake.
  • Best Edge Rake—Fits a straight edge on the best points detected using a Rake.
  • Best Hough Edge Rake—Fits the strongest straight edge using all points detected using a Rake.
  • First Edge Projection—Uses the location of the first projected edge as the straight edge.
  • Best Edge Projection— Finds the strongest projected edge location to determine the straight edge.
Search Direction Direction in which you want the search lines to look for a straight edge within the region of interest. The following options are available:
  • Left to Right—Searches for edges within the region of interest from left to right.
  • Right to Left—Searches for edges within the region of interest from right to left.
  • Top to Bottom—Searches for edges within the region of interest from top to bottom.
  • Bottom to Top—Searches for edges within the region of interest from bottom to top.
Edge Polarity Specifies the pixel intensity transitions to use to determine edges. The following options are available:
  • Any Edge—Finds edges characterized by dark-to-bright and bright-to-dark pixel intensity transitions.
  • Dark to Bright—Finds only those edges characterized by dark-to-bright pixel intensity transitions along the direction of the search line.
  • Bright to Dark—Finds only those edges characterized by bright-to-dark pixel intensity transitions along the direction of the search line.
Minimum Edge Strength Minimum difference in the intensity values between the edge and its surroundings.
Minimum Edge SNR Specifies the minimum signal to noise ration (SNR) of the edge points used to fit the straight line. The default is 0.
Kernel Size Specifies the size of the edge detection kernel.
Gap Specifies the size, in pixels, of the space between the search lines. This control is only used with a Rake-based Detection Method.
Projection Width 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. This control is available only for Rake-based detection methods.
Interpolation Specifies the interpolation method used to locate the edge position. The following options are available:
  • Zero Order—Rounds to the nearest integral edge location.
  • Bilinear—Uses bilinear interpolation to compute the edge location.
  • Bilinear Fixed—Uses bilinear fixed interpolation to compute the edge location.
Projection Method Specifies the method used to process the data extracted by the edge detector. The following options are available:
  • Average—Averaged the data extracted for edge detection.
  • Median—Computes the median of the data extracted for edge detection.
# Straight Edges Found Displays the number of straight edges found by the step.
Search Line/Edge Index For a Rake-based Detection Method, specifies the search line used by the Edge Strength Profile and Edge Points Found on Search Line controls.
Edge Strength Profile Displays a strength profile of the edges found along the specified Search Line/Edge Index based on the current control settings.
Edge Points Found on Search Line Displays information about the edge points found on the specified Search Line/Edge Index. The following information is displayed for each edge:
  • X—X-coordinate of the edge.
  • Y—Y-coordinate of the edge.
  • Strength—Strength of the edge. Higher values indicate a stronger edge.
  • STR—Signal to threshold ratio for the edge.
  • TNR—Threshold to noise ratio for the edge.
  • SNR—Signal to noise ratio for the edge.

Straight Edge Settings Tab

The following controls are available on the Straight Edge Settings tab.

Control Name Description
Suggest Values When enabled, the step suggests appropriate values for the Straight Edge Settings controls.
Minimum Score Specifies the minimum score of a detected straight edge. Refer to the NI Vision Concepts Manual for a description of the straight edge score returned by the step.
Maximum Score Specifies the maximum score of a detected straight edge. Refer to the NI Vision Concepts Manual for a description of the straight edge score returned by the step.
Angle Range Specifies the positive and negative range within which the straight edge is expected to be found relative to the region of interest.
Angle Tolerance Specifies the expected angular accuracy of the straight edge.
Minimum Coverage Specifies the number of points, as a percentage of the number of search lines, that need to be included in the detected straight edge.
Maximum Iterations Specifies the number of iterations used for a Hough Detection Method.
# Straight Edges Requested Specifies the number of straight edges to find in the image.
# Straight Edges Found Displays the number of straight edges found by the step.
Search Line/Edge Index For a Rake-based Detection Method, specifies the search line used by the Edge Strength Profile and Edge Points Found on Search Line controls.
Edge Strength Profile Displays a strength profile of the edges found along the specified Search Line/Edge Index based on the current control settings.
Edge Points Found on Search Line Displays information about the edge points found on the specified Search Line/Edge Index. The following information is displayed for each edge:
  • X—X-coordinate of the edge.
  • Y—Y-coordinate of the edge.
  • Strength—Strength of the edge. Higher values indicate a stronger edge.
  • STR—Signal to threshold ratio for the edge.
  • TNR—Threshold to noise ratio for the edge.
  • SNR—Signal to Noise (SNR) for the edge.

Limits Tab

The following controls are available on the Limits tab.

Control Name Description
Number of Straight Edges When enabled, the number of straight edges found by the step must lie within the minimum and maximum values in order for the step to pass.
Angle in Search Area When enabled, the Angle in search Area of the first straight edge listed in the Straight Edge Results table must lie within the minimum and maximum values in order for the step to pass.
Straightness When enabled, the Straightness of the first straight edge listed in the Straight Edge Results table must lie within the minimum and maximum values in order for the step to pass.
Sort Results By Specifies the measurement result you want to use to sort the results displayed in the Straight Edge Results table. The following options are available:
  • Search Direction—Corresponds to the order in which the edges are detected by the algorithm.
  • Midpoint X then Y Position (Pixels)—Sorts detected edges in order of the horizontal position (in pixels) of their center of mass.
  • Midpoint Y then X Position (Pixels)—Sorts detected edges in order of the vertical position (in pixels) of their center of mass.
  • Midpoint X then Y Position (Calibrated)—Sorts detected edges in order of the horizontal position (in real world units) of their center of mass.
  • Midpoint Y then X Position (Calibrated)—Sorts detected edges in order of the vertical position (in real world units) of their center of mass.
  • Angle in Search Area—Sorts detected edges based on the angle at which the edge is detected relative to the region of interest.
  • Straightness—Sorts detected edges based on the straightness of the edges.
  • Score—Sorts detected edges based on the score of the detected edges.
  • Average SNR—Sorts detected edges based on the average signal to noise ratio of the edges.
  • Coverage—Sorts detected edges based on the number of points, as a percentage of the number of search lines, that need are included in the detected straight edge.
Sort Order Specifies how the results are sorted. The following options are available:
  • Ascending—Displays results from the lowest value to the highest value.
  • Descending—Displays results from the highest value to the lowest value.
Straight Edge Results Displays information about the straight edges found in the image.
# Straight Edges Found Displays the number of straight edges found by the step.