Generate Path from Contour
Usage Scenario
This Step is typically used in edge gluing applications for objects such as rectangular hatches/glass.
Parameter Description
This Step includes four parameter groups, and the descriptions are as follows:
-
General Params: This parameter group is used for general settings. Please adjust the parameters according to the actual requirement.
-
Smooth Points: When the edge point cloud of the object is jagged, you may need to adjust this parameter group to make the edge point cloud smoother.
-
Special Side Erode: This parameter group is designed for special applications, and it does not need to be adjusted in general.
-
Find Corners: When there are obvious corners on the edge point cloud, you will need to adjust this parameter group.
General Params
- Mask Closing Kernel Size
-
Description: This parameter is used to set the size of the kernel when a closing operation is applied to the image mask. The unit is pixels.
Default value: 5 px
- Points Sample Size
-
Description: This parameter is used to specify the interval between waypoints in the generated path. The unit is pixels. The larger the value, the larger the interval between waypoints. Please refer to the tuning example for the application result.
Default value: 10 px
- Edge Zoom Type
-
Description: This parameter is used to select the method to generate a path based on the edge point cloud.
Value list: ByErode, ByVertical
-
ByErode: Generates a path by erosion operation.
-
ByVertical: Generates a path by calculating vertical lines of the point tangent lines on the edge point cloud.
Default value: ByErode.
+ Tuning recommendation: It is recommended to select ByErode.
-
- Erode Kernel Size
-
Description: When the Edge Zoom Type is set to ByErode, this parameter is used to determine the distance between the path and the object edge and whether the path is within or outside the object edge. The unit is pixels. When the parameter value is positive, the generated path will be within the object edge. When the parameter value is negative, the generated path will be outside the object edge. Please refer to the tuning example for the corresponding result.
Default value: 15 px
- Vertical Move Real Dis
-
Description: When the Edge Zoom Type is set to ByVertical, this parameter is used to determine the distance between the path and the object edge and whether the path is within or outside the object edge. The unit is millimeters. When the parameter value is positive, the generated path will be within the object edge. When the parameter value is negative, the generated path will be outside the object edge. Please refer to the tuning example for the corresponding result.
Default value: 8.000 mm
Smooth Points
- Use Gaussian Filter
-
Description: When the edge point cloud is jagged, this parameter is used to determine whether to use the Gaussian filter to make the edge point cloud smoother.
Default Value: Unselected.
Tuning recommendation: Please select this option according to the actual requirement.
- Gaussian Filter Radius
-
Description: This parameter is used to specify the radius of the Gaussian filter. The unit is pixels.
Default value: 20 px
Tuning recommendation: It is recommended to use the default value.
- Gaussian Filter Sigma
-
Description: This parameter is used to specify the sigma of the Gaussian filter.
Default value: 5.0000
Tuning recommendation: It is recommended to use the default value.
Special Side Erode
This parameter group is designed for special applications, and it does not need to be adjusted in general.
Find Corners
- Sample Size for Corner
-
Description: This parameter is used to set the coefficient of the downsampling on the edge point cloud. The unit is pixels. Downsampling facilitates the detection of the corner points in the edge point cloud.
Default value: 3
- Quality Level
-
Description: This parameter is used to detect the corner points of the edge point cloud. It ensures that waypoints are located in the corners no matter how large the waypoint interval is.
Default value: 0.0100
Tuning recommendation: It is recommended to use the default value.
- Min Distance
-
Description: This parameter is used to specify the minimum distance (in pixels) between corners when detecting the corner points.
Default value: 50.0000
- Max Corners
-
Description: This parameter is used to specify the maximum number of corners of the object.
Default value: 4
- Block Size
-
Description: This parameter is used to specify the size of the detection area. When the corner points are not obvious enough or the edge point cloud is too smooth, you can increase the value.
Default value: 10
- Use Harris Detector
-
Description: This parameter is used to determine whether to use Harris corner detector. Once this option is selected, you will need to set the K value.
Default Value: Unselected.
Tuning recommendation: In general, this option does not need to be used.
Tuning Examples
Points Sample Size
When Points Sample Size is set to 20 and 5, respectively, the waypoints in the generated path are shown below.
For the left figure, Points Sample Size is set to 20, and the waypoints are relatively sparse; for the right figure, Points Sample Size is set to 5, and the waypoints are relatively dense.
Erode Kernel Size
When Erode Kernel Size is set to 5 and 15, respectively, the generated paths are shown below.
For the left figure, Erode Kernel Size is set to 5; for the right figure, Erode Kernel Size is set to 15. As the positive value increases, the generated path will shrink toward the inside of the object’s edge.
When Erode Kernel Size is set to −5 and −20, respectively, the generated paths are shown below.
For the left figure, Erode Kernel Size is set to −5; for the right figure, Erode Kernel Size is set to −20. As the negative value decreases, the generated path will expand towards the outside of the object’s edge.
Vertical Move Real Dis
When Vertical Move Real Dis is set to 5 and 15, respectively, the generated paths are shown below.
For the left figure, Vertical Move Real Dis is set to 5; for the right figure, Vertical Move Real Dis is set to 15. As the value of the positive number increases, the generated path will shrink towards the inside of the object edge.
When Vertical Move Real Dis is set to −5 and −20, respectively, the generated paths are shown below.
For the left figure, Vertical Move Real Dis is set to −5; for the right figure, Vertical Move Real Dis is set to −20. As the negative value decreases, the generated path will expand towards the outside of the object edge.