Open3D icon indicating copy to clipboard operation
Open3D copied to clipboard

Improved performance of function geometry::PointCloud::RemoveRadiusOutliers, function geometry::ClusterDBSCAN and feature counting

Open PiatrouskiIM opened this issue 1 year ago • 6 comments

Type

  • [ ] Bug fix (non-breaking change which fixes an issue): Fixes #
  • [ ] New feature (non-breaking change which adds functionality). Resolves #
  • [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) Resolves #

Motivation and Context

Performance improvements.

Checklist:

  • [x] I have run python util/check_style.py --apply to apply Open3D code style to my code.
  • [ ] This PR changes Open3D behavior or adds new functionality.
    • [ ] Both C++ (Doxygen) and Python (Sphinx / Google style) documentation is updated accordingly.
    • [ ] I have added or updated C++ and / or Python unit tests OR included test results (e.g. screenshots or numbers) here.
  • [x] I will follow up and update the code if CI fails.
  • [x] For fork PRs, I have selected Allow edits from maintainers.

Description

  1. Determining the presence of a sufficient number of neighbors in a given radius in the geometry::PointCloud::RemoveRadiusOutliers function can be carried out by the SearchHybrid function instead of the SearchRadius function. 2.0 When clustering in PointCloud::ClusterDBSCAN, a set of visited points is created for each new cluster. Elements are added to this set based on the presence of a certain label. This set is subsequently used to add elements to the set of unvisited points. The same thing can be done much more efficiently based only on labels. 2.1 And there is also no need to represent the collection of unvisited points as an unordered set, given that the only difference is the additional protection against duplication when adding a new element.
  2. When counting features in ComputePairFeatures, angles are compared, but given that the arc cosine is a monotonically decreasing function, its influence on the comparison result is limited to a change in sign.

PiatrouskiIM avatar Mar 03 '24 08:03 PiatrouskiIM