Question

Finding X nearest neighbors in a pointcloud

  • 26 September 2022
  • 2 replies
  • 3 views

Badge

Hi,

I'm curious if anyone has found an efficient way to calculate the X nearest neighbors in a pointcloud or a set of 3D points from a single 3D point.

 

My current method is mathematically calculating the distance from point 1 to every point in my pointcloud with the following formula and then sorting by distance.

d (P1, P2)= ((x2 - x1)^2 + (y2 - y1)^2 + (z2 - z1)^2)^1/2  

 

It works but it's not efficient at all.

I'm curious if anybody has a more efficient idea.

 

Thanks,

Mark

 

 

 


2 replies

Badge

A NeighborFinder that can work with 3D points would probably do the trick.

Is this on the roadmap?

Userlevel 4
Badge +36

Maybe buffer the single 3D point with an appropriate amount, and only consider the points (or the part of the pointcloud) within the buffer.

Reply