Skip to content

ICP: point-to-plane metric, robust weighting and 2 fixes - #144

Merged
dgirardeau merged 5 commits into
CloudCompare:masterfrom
capCafu:icp-point-to-plane
Nov 28, 2026
Merged

dgirardeau merged 5 commits into
CloudCompare:masterfrom
capCafu:icp-point-to-plane

Conversation

@capCafu

@capCafu capCafu commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

Three commits; the two fixes come first and don't depend on the feature.

  1. Fix a crash with a reference mesh, normals matching and farthest points removal. The farthest points filtering didn't copy the CPSet scalar field (the nearest triangle indexes), which the normals matching code reads.
  2. Fix normals matching when the reference cloud is subsampled. The CPSet indexes refer to the subsampled cloud, but the normals were read from the input cloud (follow-up to 6e50a7c).
  3. Add Parameters::errorMetric and Parameters::robustWeighting.
    • POINT_TO_PLANE: linearized least squares on 6 degrees of freedom, solved with an eigen-decomposition so that undetermined motions (e.g. a plane sliding on itself) stay at zero. The transformation filters remove the corresponding degrees of freedom, so they're applied exactly. It needs the model normals (or a mesh: the triangle normals) and can't adjust the scale (ICP_ERROR_INVALID_INPUT otherwise).
    • HUBER_WEIGHTING / CAUCHY_WEIGHTING / TUKEY_WEIGHTING: iteratively reweighted least squares, with the scale estimated as 1.4826 × the median absolute residual and the usual constants (1.345 / 2.3849 / 4.685).
    • The defaults (POINT_TO_POINT, NO_ROBUST_WEIGHTING) keep the previous behavior and results.

Needed by the point-to-plane ICP PR in the CloudCompare repo: CloudCompare/CloudCompare#2556. Its submodule points to this branch, so this PR should be merged first.

@dgirardeau dgirardeau left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this interesting contribution. ICP is obviously something used a lot.

Comment thread src/RegistrationTools.cpp Resolved
Comment thread src/RegistrationTools.cpp Resolved
Comment thread include/RegistrationTools.h Resolved
@capCafu

capCafu commented Nov 28, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the review! The changes are in 9cfe63d and 1cc1f4c.

@capCafu

capCafu commented Nov 28, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the approval! I don't have write access to CCCoreLib, so I can't merge it myself. Could you merge it?
I'll then point the submodule in CloudCompare/CloudCompare#2556 to the merged commit.

@dgirardeau
dgirardeau merged commit 38bd154 into CloudCompare:master Nov 28, 2026
@capCafu
capCafu deleted the icp-point-to-plane branch November 28, 2026 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants