RANSAC Fitting With Normals
Description
This operator uses the RANSAC algorithm to fit geometric models to the input point cloud data, capable of fitting basic geometric shapes such as planes, lines, spheres, and 3D circles.
RANSAC is an iterative algorithm that can identify "inliers" (points that fit the model) and "outliers" (noise or points that do not fit the model) in the input data, estimating accurate model fitting parameters.
Overview
Performs geometric model fitting on input point cloud data using the RANSAC algorithm, outputting basic geometric shapes such as planes, lines, spheres, and 3D toroids.
Scenarios
-
Geometric Object Detection: When specific geometric shapes (e.g., tabletops, pipes, spherical objects, circular holes) need to be detected and located in complex 3D scenes.
-
Point Cloud Segmentation: Segmenting the point cloud into different parts based on whether it fits a certain geometric model. For example, extracting all flat surfaces from a scene.
-
Noise Filtering: By identifying the main geometric structures, noise points that do not fit the structure can be identified as outliers and separated.
-
Parameter Estimation: Extracting precise parameters of specific geometric shapes from point cloud data, such as plane equations, sphere centers, and radii.
Inputs and Outputs
Inputs |
Point Cloud: The input point cloud data to be fitted, which can be a point cloud or a list of point clouds. |
Outputs |
Inlier Point Cloud: Point cloud belonging to the fitted model (inliers). Outlier Point Cloud: Point cloud not belonging to the fitted model (outliers). Equation Parameters: List of equation parameters for the fitted shapes. Result Direction: Result direction. Plane fitting returns the plane normal, line fitting returns the line direction, cylinder fitting returns the cylinder axis direction, 3D circle fitting returns the circle normal, and sphere fitting does not return a direction. |
Parameters
Fitting Model
Description |
Choose based on the shape of the object to be detected in the point cloud. For example, select "Plane" to detect a tabletop; try "Line" (axial) or "Circle" in subsequent "RANSAC Fitting (With Normals)" to detect (a part of) a pipe. |
Parameter Range |
Options: Plane, Line, Sphere, 3D Circle |
Parameter Range |
Values/Range:
Default: Plane |
Model Direction
Description |
Provide a rough reference direction. For example, if the requirement is to detect a roughly vertical plane, set this parameter to [0,0,1] or [0,0,-1] (assuming Z-axis is up). The algorithm will search for the best match within this reference direction and the allowed "Axial Float Range" (angleEps). If the direction is completely unknown, the constraint of this parameter will weaken, and "Axial Float Range" can be increased. |
Parameter Range |
|
Parameter Range |
Default: [0, 0, 1.0] |
Allowed Axis Deviation
Description |
|
Parameter Range |
[0, 300], Default value: 30, Unit: ° |
Parameter Range |
Values/Range: [0.0, 300.0] Default: 30.0 Unit: ° |
Radius
Description |
Provide an estimated value of the expected radius. The algorithm will combine "Radius Float Range" (radiusEps) to find the best match near this estimated value. |
Parameter Range |
[0, 10000], Default value: 10, Unit: mm |
Parameter Range |
Values/Range: [0, 10000] Default: 10.0 |
Allowed Radius Deviation
Description |
|
Parameter Range |
[0, 300], Default value: 5, Unit: mm |
Parameter Range |
Values/Range: [0.0, 300.0] Default: 5.0 Unit: mm |
Minimum Fitting Points
Description |
|
Parameter Range |
[1, 10000000], Default value: 100 |
Parameter Range |
Values/Range: [1, 10000000] Default: 100 |
Maximum Fitting Points
Description |
This parameter is usually used to prevent a very large structure fitting the model (e.g., a huge flat background) from consuming all points, making it impossible to detect other smaller structures on it. If the main goal is to detect the largest structure fitting the model in the scene, this value can be set very large. |
Parameter Range |
[1, 4000000], Default value: 4000000 |
Parameter Range |
Values/Range: [1, 10000000] Default: 4000000 |
Repeat Count
Description |
Note: Increasing this value will significantly increase calculation time. |
Parameter Range |
[0, 5000], Default value: 1 |
Parameter Range |
Values/Range: [0, 5000] Default: 1 |
Maximum Iterations
Description |
|
Parameter Range |
[0, 100000], Default value: 100 |
Parameter Range |
Values/Range: [0, 100000] Default: 100 |
Loss Function Threshold
Description |
It is recommended to carefully adjust this parameter based on point cloud density, noise level, and model accuracy requirements. Start with a moderate value, observe the fitting results, and then adjust gradually. |
Parameter Range |
[0, 1000000], Default value: 8 |
Parameter Range |
Values/Range: [0, 1000000] Default: 8.0 |