Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Faster octree radiusSearch #6045

Merged
merged 1 commit into from
May 28, 2024

Conversation

mvieth
Copy link
Member

@mvieth mvieth commented May 17, 2024

... by improving the check whether an octree node might contain a point within radius. Previously this was done by a sphere around the node center (some nodes were checked although that would not have been necessary), now this is done exact (like a rounded cube).

Benchmarks:
NormalEstimation (without OpenMP) with octree:

NormalEstimation Old New
r=0.01, cloud=milk 914 ms 756 ms
r=0.01, cloud=mug 1133 ms 881 ms
r=0.02, cloud=milk 1979 ms 1784 ms
r=0.02, cloud=mug 2642 ms 2244 ms

Calling radiusSearch on every (valid) point of a cloud (r is tuned so that 5 and 50 neighbours are found on average, respectively):

Search Old New
r=0.0016, cloud1 267 ms 175 ms
r=0.0022, cloud2 319 ms 210 ms
r=0.0072, cloud3 421 ms 293 ms
r=0.005, cloud1 440 ms 356 ms
r=0.0068, cloud2 513 ms 441 ms
r=0.024, cloud3 877 ms 873 ms

@mvieth mvieth added changelog: enhancement Meta-information for changelog generation module: octree labels May 17, 2024
... by improving the check whether an octree node might contain a point within radius. Previously this was done by a sphere around the node center, now this done exact (like a rounded cube).

Benchmarks:
NormalEstimation (without OpenMP) with octree:
| NormalEstimation  | Old       | New        |
|-------------------|-----------|------------|
| r=0.01, cloud=milk| 914 ms    | 756 ms     |
| r=0.01, cloud=mug | 1133 ms   | 881 ms     |
| r=0.02, cloud=milk| 1979 ms   | 1784 ms    |
| r=0.02, cloud=mug | 2642 ms   | 2244 ms    |

Calling radiusSearch on every (valid) point of a cloud (r is tuned so that 5 and 50 neighbours are found on average, respectively):
| Search          | Old       | New        |
|-----------------|-----------|------------|
| r=0.0016, cloud1| 267 ms    | 175 ms     |
| r=0.0022, cloud2| 319 ms    | 210 ms     |
| r=0.0072, cloud3| 421 ms    | 293 ms     |
| r=0.005, cloud1 | 440 ms    | 356 ms     |
| r=0.0068, cloud2| 513 ms    | 441 ms     |
| r=0.024, cloud3 | 877 ms    | 873 ms     |
@mvieth mvieth force-pushed the faster_octree_radiussearch branch from 4ca540c to 6503e53 Compare May 17, 2024 16:02
@mvieth mvieth requested review from larshg May 27, 2024 09:54
@mvieth mvieth merged commit e4ce309 into PointCloudLibrary:master May 28, 2024
13 checks passed
@mvieth mvieth deleted the faster_octree_radiussearch branch May 28, 2024 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog: enhancement Meta-information for changelog generation module: octree
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants