kdtree provides a minimalistic implementation of kd-tree. The implementation can be used either inside MATLAB by means of MEX calls, or as a standalone tool, directly from a C/C++ program. The image on the website has been creaed with "fulltest.m"
This implementation offers the following functionalities:
- kdtree_build: k-d tree construction O( n log^2(n) )
- kdtree_delete: frees memory allocated by kdtree
- kdtree_nearest_neighbor: nearest neighbor query (for one or more points)
- kdtree_k_nearest_neighbors: kNN for a single query point
- kdtree_range_query: rectangular range query
- kdtree_ball_query: queries samples withing distance delta from a point
IMPORTANT NOTE: as Matlab offers a kdtree I have lost interest in maintaining this code.
Andrea Tagliasacchi (2022). ataiya/kdtree (https://github.com/taiya/kdtree), GitHub. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
Inspired: Kdtree implementation in matlab
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!