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

KDTreeFlann #56

Closed
xiaopeige opened this issue Mar 29, 2021 · 12 comments
Closed

KDTreeFlann #56

xiaopeige opened this issue Mar 29, 2021 · 12 comments

Comments

@xiaopeige
Copy link

Hello, when I use EstimateNormals and ComputeFPFHFeature, I found that geometry::KDTreeFlann kdtree (that is, building kdtree) takes a lot of time. I want to update it here. Do you have any suggestions for improvement?

@neka-nat
Copy link
Owner

neka-nat commented Apr 2, 2021

You could replace it with brute force nn.
https://github.com/neka-nat/cupoch/blob/master/src/cupoch/geometry/bruteforce_nn.h
I haven't tried it, so it may not be faster.

@xiaopeige
Copy link
Author

Thank you, but I found that building kdtree in cupoch on gpu; and kdtree in open3d on cpu, the latter is faster, how should I explain this?

@neka-nat
Copy link
Owner

neka-nat commented Apr 7, 2021

Yes.
It depends on the number of points. the GPU is effective only when the number of points is more than 0.1~1 million.

@xiaopeige
Copy link
Author

My point count is always around 2000, so can change it to build kdtree on cpu?

@neka-nat
Copy link
Owner

neka-nat commented Apr 7, 2021

For that number, the cpu is the better choice. faster.

@xiaopeige
Copy link
Author

Yes, I want to use the cpu version of kdtree in Cupoch. Is this feasible?

@neka-nat
Copy link
Owner

neka-nat commented Apr 7, 2021

The cpu version is not implemented, so please use open3d or scipy's kdtree.

@xiaopeige
Copy link
Author

I put the kdtree of open3d in the 3rdparty of Cupoch, and then recompile, is this feasible?

@neka-nat
Copy link
Owner

neka-nat commented Apr 7, 2021

I'm sure you can.

@xiaopeige
Copy link
Author

ok ,thank you

@neka-nat neka-nat closed this as completed Apr 7, 2021
@xiaopeige
Copy link
Author

Build kdtree on cpu and gpu respectively. The difference lies in uploadtreetoGPU. This step takes more time, for a small number of point clouds (around 2000). I have completed the compilation of the cpu version of kdtree in Cupoch, but there is a problem with the operation, because the modules in the cupoch (such as EstimateNormals and ComputeFPFHFeature) are completed in the GPU, but the search kdtree is completed in the cpu, which is incompatible. Do you have any suggestions?

@neka-nat
Copy link
Owner

If the number of points is about 2000, it would be faster to use the CPU for calculations other than kdtree.

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

No branches or pull requests

2 participants