Comparison of two algorithms for finding K-nearest neighbors based on spatial sub-cubes[J]. Journal of Image and Graphics, 2011, 16(9): 1676-1680.DOI: 10.11834/jig.20110908.
Space block strategy is the effective method in finding K-nearest neighbors.However,during dividing the min-max box of the dataset,the size of sub-cubes mainly is decided by the K value,and the min-max box is needed to divide again along with the change of K value in existing algorithms,it has affected time efficiency and stability of algorithm.Using the advantages of space block strategy,a new algorithm for finding K-nearest neighbors is presented with establishing the space index of scattered points as the spatial division goal.The min-max box of the dataset is divided into a set of uniform sub-cubes in advanced,the structure of sub-cubes is only related to the scattered points and the default parameter,the same points cloud data just is distributed one time.In the course of searching,the dynamic sphere is builded using the test point as the center of sphere,and judging eligible sub-cubes in order to find K-nearest neighbors.The experimental results show that the new algorithm is more superiority than existing algorithms in points cloud distribution and searching time efficiency,the stability of searching time of random points,and the adaptability of different K value.