Fit Plane to Point Cloud

You are currently viewing the documentation for the latest version (2.1.1). To access a different version, click the "Switch version" button located in the upper-right corner of the page.

■ If you are not sure which version of the product you are currently using, please feel free to contact Mech-Mind Technical Support.

Description

This Step is used to fit a plane to a 3D point cloud.

function demo

Workflow

The process of configuring this Step is as follows:

fit plane to point cloud wkf
  1. Configure the input. Connect the ports manually in the graphical programming workspace or select the input under Input in the parameter configuration panel.

  2. Determine whether to use a feature region.

  3. Set other parameters.

  4. Select the desired output items under Output. For an expandable output item, click ▶ and configure the Min and Max values to set the acceptable range.

  5. Run the Step and view output.

Parameter Description

Parameter Description

Use Feature Region

When this option is unselected, all points will be used for plane fitting.

Once this option is selected, you can set one or more feature regions. Only points within the feature region(s) will be used for plane fitting.

Point Cloud Downsampling

This parameter is used to determine whether to downsample the point cloud before plane fitting. When the point cloud is very dense, you can use downsampling to reduce the number of points and improve calculation efficiency.

Once this option is selected, you need to set Voxel Size:

The downsampling process divides the point cloud space into cubic voxels (3D grids), replacing all points within each voxel with a single representative point. A larger voxel size speeds up processing but may increase fitting error. A smaller voxel size preserves more details and improves fitting accuracy, at the cost of slower processing.

Voxel size is usually set to twice the resolution of the point cloud.

Max Iterations

The maximum number of attempts the algorithm will make to fit an optimal plane. Iteration stops once this limit is reached.

Default value: 40

Plane Type

Select the type of plane to fit.

  • Global plane (default): Fits a global plane using all points.

  • Largest plane: Finds the plane with the largest area.

  • Farthest plane: Finds the plane farthest from the origin.

  • Nearest plane: Finds the plane closest to the origin.

Plane Normal Direction

This parameter is used to constrain the direction of the plane’s normal to determine the plane orientation. The algorithm will only look for the plane whose normal points roughly in the specified direction.

Value list: All directions, Positive Z, Negative Z, Positive X, Negative X, Positive Y, Negative Y, Custom

If Custom is selected, set the Tilt Angle and Direction Angle to determine a unique direction vector as the normal of the fitted plane.

  • Tilt Angle: Refers to the angle between the plane’s normal and the positive Z-axis, which determines how far the normal deviates from the Z-axis.

  • Direction Angle: Refers to the angle between the XOY projection of the plane’s normal and the positive X-axis, which determines the direction of the normal.

Output Description

The output of this Step is a fitted plane that can be used as input to other Steps.

Troubleshooting

  • For common errors, see Error Code List.

  • If the error code is inconsistent with the error message, please contact Technical Support for help.

CV-W7101

Error: The set “Plane Normal Direction” is invalid.

Solution: Select a valid plane normal direction from the drop-down list.

CV-W7102

Error: Too few points in the point cloud to fit a plane.

Possible causes:

  • Too few points in the point cloud input to the Step.

  • Too few points in the feature region(s).

  • The voxel size for downsampling is too large, which results in insufficient points.

Solutions:

  • Ensure that there are enough points in the point cloud input to the Step for plane fitting.

  • Adjust the feature region (s) to ensure that enough points are within the feature region(s) to fit a plane.

  • Adjust “Voxel Size” to ensure sufficient points after downsampling.

CV-W7103

Error: Unable to fit a plane because the number of points matching the specified normal direction is insufficient.

Solution: Set the plane normal direction properly to ensure that enough points can be used to fit a plane.

CV-W7104

Error: Unable to fit a plane because no plane meets the specified requirements.

Solution: Check the parameter settings to ensure that there is a plane that meets the requirements.

Is this page helpful?

You can give a feedback in any of the following ways:

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.