Generate Path from Contour

Function

This Step generates a path from the input edge point cloud.

Usage Scenario

This Step is typically used in edge gluing applications for objects such as rectangular hatches/glass.

In the actual application process, due to factors such as the camera mounting angle and lighting, point clouds may lack necessary parts or have excessive noise. This can lead to changes or deviations in the starting point of the generated path, so it is recommended to use this Step only as an aid for path generation.

For objects of the same type, you can obtain a stable path by following the steps below.

  1. Use the object’s point cloud in conjunction with this Step to generate an initial path, and adjust the waypoints in the path.

  2. Take the object’s point cloud as a point cloud model, use the adjusted waypoints as multiple pick points for the point cloud model, and set the object center point in the point cloud model.

  3. Perform 3D matching on the object using the point cloud model and object center point, obtain the object’s pick points, and then use the “Map to Multiple Pick Points” Step to obtain multiple pick points for the object, which make up a stable path altogether.

Input and Output

generate traj by contour input and output

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.

generate traj by contour point sample size

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.

generate traj by contour erode kernal size 1

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.

generate traj by contour erode kernal size 2

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.

generate traj by contour vertical move real dis 1

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.

generate traj by contour vertical move real dis 2

We Value Your Privacy

We use cookies to provide you with the best possible experience on our website. By continuing to use the site, you acknowledge that you agree to the use of cookies. If you decline, a single cookie will be used to ensure you're not tracked or remembered when you visit this website.