Best Fit

You are currently viewing the documentation for the latest version (2.2.2). 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.

Function Description

Align a measured point cloud to a base point cloud by optimizing the rigid transformation that minimizes gap and flush deviations at multiple measurement points.

Usage Scenario

This Step is used in body-in-white (BIW) gap and flush inspection scenarios. It optimizes the alignment between a reference point cloud and a measured point cloud to minimize the gap and flush deviations at multiple measurement points. This Step supports automatic outlier removal and configurable six-degree-of-freedom constraints.

Input and Output

Input

Input Port Data Type Description

Base Cloud

PointCloud

The reference point cloud of the target object in its nominal position. This cloud serves as the baseline for gap and flush optimization.

Cloud to be Transformed

PointCloud

The measured point cloud to be transformed. It is aligned with the base cloud by optimizing the gap and flush deviations at the measurement poses.

Base Poses

Pose[]

The measurement poses that define the positions and orientations where gap and flush are evaluated. Each pose defines a local XZ plane where gap (X) and flush (Z) deviations are measured.

Target Gaps

Number[]

The target gap values in the local X direction for each measurement pose. The gap deviation is the measured gap minus this target value.

Target Flushes

Number[]

The target flush values in the local Z direction for each measurement pose. The flush deviation is the measured flush minus this target value.

Gap Participates In Optimization

Bool[]

Optional per-pose flags indicating whether the gap residual at that pose participates in optimization. If omitted or empty, all poses participate in gap optimization.

Flush Participates In Optimization

Bool[]

Optional per-pose flags indicating whether the flush residual at that pose participates in optimization. If omitted or empty, all poses participate in flush optimization.

Output

Output Port Data Type Description

Transform

Pose

The optimal rigid transformation that minimizes the weighted gap and flush deviations across all measurement points. Applying this transformation aligns the measured point cloud with the base point cloud.

Gaps

Number[]

The gap measurements in the local X direction after applying the optimized transformation. Each value corresponds to an input measurement pose.

Flushes

Number[]

The flush measurements in the local Z direction after applying the optimized transformation. Each value corresponds to an input measurement pose.

Parameter Description

Threshold Settings

Parameter Description

Dist Thresh to Plane

Sets the distance threshold to the local plane for filtering points that participate in correspondence matching. Smaller values require points to be closer to the plane.

Default value: 1.000 mm. Range: 0 to 100 mm. Step: 0.1 mm.

XYZ Dist Threshold

Sets the XYZ spatial distance threshold from a point to the measurement pose origin for filtering correspondence candidates.

Default value: 20.0 mm. Range: 0 to 1000 mm. Step: 10 mm.

Optimizer Settings

Parameter Description

Max Global Iterations

Sets the maximum number of global iterations for the Ceres solver. Higher values allow more thorough optimization but increase computation time.

Default value: 50. Range: 1 to 500. Step: 1.

Huber Loss Scale

Sets the scale parameter of the Huber loss function. It reduces the influence of large residuals (outlier correspondences) on the optimization. Smaller values provide stronger outlier suppression.

Default value: 20.0 mm. Range: 0 to 1000 mm. Step: 1 mm.

Outlier Removal Settings

Parameter Description

Enable Auto Outlier (Gap)

When enabled, the Step automatically detects and excludes outlier measurement poses based on initial gap residuals using the shortest half interval method.

Default state: Disabled.

Enable Auto Outlier (Flush)

When enabled, the Step automatically detects and excludes outlier measurement poses based on initial flush residuals using the shortest half interval method.

Default state: Disabled.

Outlier Sigma

Sets the outlier threshold: mean + sigma × standard deviation. Higher sigma values result in looser outlier detection, excluding fewer points.

Default value: 3.0. Range: 1 to 10. Step: 0.1.

DOF Constraints

Parameter Description

Free X Translation

When checked, X translation participates as a free parameter in optimization. Uncheck to lock this degree of freedom.

Default state: Enabled.

Free Y Translation

When checked, Y translation participates as a free parameter in optimization. Uncheck to lock this degree of freedom.

Default state: Enabled.

Free Z Translation

When checked, Z translation participates as a free parameter in optimization. Uncheck to lock this degree of freedom.

Default state: Enabled.

Free X Rotation

When checked, rotation around the X axis participates as a free parameter in optimization. Uncheck to lock this degree of freedom.

Default state: Enabled.

Free Y Rotation

When checked, rotation around the Y axis participates as a free parameter in optimization. Uncheck to lock this degree of freedom.

Default state: Enabled.

Free Z Rotation

When checked, rotation around the Z axis participates as a free parameter in optimization. Uncheck to lock this degree of freedom.

Default state: Enabled.

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.