Detect and Measure Oblong Hole

Function

This Step is used to detect and measure oblong hole in the input image.

Sample Scenario

This Step is used to detect the pixel-wise positions and sizes of oblong holes in images to facilitate subsequent calculation of physical dimensions in measurement scenarios.

Input and Output

../../../../_images/input_and_output1.png

Parameter Description

Parameter

Parameter Description

ROI

Set the area to be detected

Position and Orientation Correction

Adjust the position and orientation of the ROI by 2D transformation

Canny Edge Detection Low Threshold

The two thresholds are used for determining the validity of detected edges

Canny Edge Detection High Threshold

Sigma of Guassian Filter

Used to filter the image vertically within the edge detection frames

Edge Polarity Type

Used to specify which type of grayscale change will be considered as object edge points

Edge Selection

Set which detected edge point should be selected as the edge point for fitting the complete edges

Parameter Tuning

ROI
Default setting: 0
Instruction: Click Measurement Mode in the toolbar to enable the measurement mode, and then click this Step and select an ROI. The select frame is in the upper left corner of the image. It is recommended to zoom out the image first and hover the mouse on the frame. When the arrow icon becomes the hand icon, you can drag the select frame and adjust the frame size.
../../../../_images/set_roi_1.png

Once the selcetion is completed, the values will be displayed in the ROI parameters, as shown below.

../../../../_images/set_roi_2.png
Position and Orientation Correction
Default setting: Unselected
Description: If this option is selected, the ROI will be adjusted to the position and orientation that fits the object in the image according to the input 2D transformation.
Canny Edge Detection Low Threshold
Default setting: 40
Description: Edges with gradients greater than the high threshold are considered actual edges. Edges with gradients between high and low thresholds are considered actual edges only if they are connected to actual edges with gradients greater than the high threshold. Edges with gradients below the low threshold are ignored. The Soble operator is used to calculate the gradients, and the maximum of gradients is 1440.
Canny Edge Detection High Threshold
Default setting: 100
Description: Edges with gradients greater than the high threshold are considered actual edges. Edges with gradients between high and low thresholds are considered actual edges only if they are connected to actual edges with gradients greater than the high threshold. Edges with gradients below the low threshold are ignored. The Soble operator is used to calculate the gradients, and the maximum of gradients is 1440.
Sigma of Guassian Filter
Default setting: 1
Description: This parameter is used to filter the image vertically within the edge detection frames. The recommended set value is 1.
Edge Polarity Type
Default setting: Both
Options: White to Black, Black to White, Both
Description: This parameter specifies which type of grayscale change will be considered as object edge points. The grayscale change is defined as the grayscale change vertically from top to bottom in an edge detection frame.
  • White to Black: The grascale changes from white to black in the frames will be considered points on object edges.

  • Black to White: The grascale changes from black to white in the frames will be considered points on object edges.

  • Both: The grascale changes both from black to white and from white to black in the frames will be considered points on object edges.

Edge Selection
Default setting: First
Options: First, Second, Last, All
Description: In each edge detection frame, this parameter sets which detected edge point should be selected as the edge point for fitting the complete edges.
  • First: The first point from top to bottom in the frame will be selected for fitting.

  • Second: The second point from top to bottom in the frame will be selected for fitting.

  • Last: The last point from top to bottom in the frame will be selected for fitting.

  • All: All the points in the frame will be selected for fitting.