Detect Vertex
Function
This Step is used to detect and measure vertices in the input image.
Before using this Step, enable the step_measure2d option under in the menu bar. Only then can the operation be performed. |
Parameter Description
- ROI
-
Description: This parameter is used to specify the region of interest (ROI), which limits the detection and measurement range of a vertex.
Instruction: The procedure for using this Step is as follows.
-
Open Measurement Canvas (2D) View: Navigate to
in the menu bar, and select the Measurement Canvas (2D) option. Then, switch to the Measurement Canvas (2D) pane within the right Project Configuration Pane. -
Select the current Step: Click to select the current Step in the Graphical Programming Workspace.
-
Select the region to be detected: In the Measurement Canvas (2D) pane on the right, the selection box is displayed by default in the upper-left corner of the image. It is recommended to zoom the image to an appropriate scale first. Hover the mouse cursor over the selection box. When it changes to a hand icon, press and hold the left mouse button to drag and resize the box.
-
Confirm the ROI parameters: Once the selection is complete, the values of the selected region (Center X, Center Y, Width, Height, and Angle) will be displayed in the ROI parameters.
-
- Position and Orientation Correction
-
Description: This parameter is used to adjust the position and orientation of the ROI according to the input 2D transformation.
Default setting: Unselected
Instruction: If it is selected, the ROl set in the earlier execution will be converted to the position and orientation that fits the object in the image input in the current execution according to the input 2D transformation.
- Number of Edge Detection Frames
-
Parameter description: This parameter is used to set the number of edge detection frames generated within the set ROI. Object edge points used for fitting will be generated within each edge detection frame. The larger the value, the denser the edge point sampling and the higher the fitting accuracy; however, this also increases the computational load. If the value is too small, edge details may be lost.
Default value: 10
Instruction: Set the parameter according to the actual requirement.
- Grayscale Change Lower Threshold
-
Description: This Step is used to set the lower threshold of the grayscale change of the point in the edge detection frames.
Default value: 20
Instruction: Points within edge detection frames are considered object edge points when their grayscale gradient changes exceed the set lower threshold; when the gradient changes fall below the threshold, they are ignored.
- Edge Detection Frame Half Width
-
Description: This parameter is used to set the half width of the edge detection frame.
Default value: 1
Instruction: Increase the value when the edge is unclear; decrease it appropriately when the edge is clear.
- Sigma of Gaussian Filter
-
Description: This parameter is used to filter the image vertically within the edge detection frames.
Default value: 1.0
Tuning recommendation: It is recommended to use the default value.
- Edge Polarity Type
-
Description: This parameter is used to specify 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.
Value list: White To Black, Black To White, Both
-
White to Black: The grayscale changes from white to black in the frames will be considered points on object edges.
-
Black to White: The grayscale changes from black to white in the frames will be considered points on object edges.
-
Both: The grayscale changes both from black to white and from white to black in the frames will be considered points on object edges.
Default value: Both
-
- Edge Selection
-
Description: This parameter is used to select edge points detected within the edge detection frame for fitting the complete edge.
Value list: First, Second, Last, All
-
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.
Default value: First
-
Visualization Settings
- Draw Edge Points
-
Description: This parameter is used to determine whether to display the object edge points used for fitting on the image. Object edge points are detected through grayscale changes in the edge detection frames which are generated and arranged in parallel along the lateral direction within the manually selected ROI.
Default setting: Selected
Instruction: When enabled, edge points are displayed in green. Display can be toggled as needed.
- Draw ROI
-
Description: This parameter is used to determine whether to display the boundary of the manually selected ROI on the image.
Default setting: Selected
Instruction: When enabled, the ROI is outlined in blue. Display can be toggled as needed.
- Draw Vertex
-
Description: This parameter is used to determine whether to display the detected vertex in the ROI on the image.
Default setting: Selected
Instruction: When enabled, the vertex is displayed in pink. Display can be toggled as needed.
- Draw Baseline
-
Description: This parameter is used to determine whether to display the baseline of the ROI on the image, which is the top side of the ROI.
Default setting: Selected
Instruction: When enabled, the baseline is displayed in yellow. Display can be toggled as needed.