Faster octree nearestKSearch#6037
Merged
mvieth merged 1 commit intoPointCloudLibrary:masterfrom May 13, 2024
Merged
Conversation
Inspired by the logic in organized.h: always keep `point_candidates` sorted, inserting new entries at the correct places. This avoids repeated calls to std::sort and having more than `k` entries in `point_candidates`. Benchmarks: NormalEstimation with octree: | NormalEstimation | Old | New | |-------------------|-----------|------------| | k=50, cloud=milk | 2607 ms | 1842 ms | | k=50, cloud=mug | 2043 ms | 1505 ms | | k=100, cloud=milk | 5650 ms | 3075 ms | | k=100, cloud=mug | 3824 ms | 2436 ms | Calling nearestKSearch on every (valid) point of a cloud: | Search | Old | New | |--------------|-----------|------------| | k=1, cloud1 | 818 ms | 509 ms | | k=1, cloud2 | 791 ms | 613 ms | | k=1, cloud3 | 773 ms | 744 ms | | k=5, cloud1 | 914 ms | 637 ms | | k=5, cloud2 | 950 ms | 780 ms | | k=5, cloud3 | 1083 ms | 1033 ms |
4426fd8 to
bf0965b
Compare
larshg
approved these changes
May 13, 2024
Contributor
|
Nice improvements! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Inspired by the logic in organized.h: always keep
point_candidatessorted, inserting new entries at the correct places. This avoids repeated calls to std::sort and having more thankentries inpoint_candidates.Benchmarks:
NormalEstimation (without OpenMP) with octree:
Calling nearestKSearch on every (valid) point of a cloud: