Questions tagged [kdtree]

A k-d-tree (k-dimensional tree) is a data structure for storing points in multidimensional space. They can be used to efficiently query for whether a point exists, as well as to do Euclidean nearest-neighbor searches and searches inside of hyperdimensional rectangular regions.

457 questions
0
votes
3 answers

Is it possible to find the KNN for a node that is *IN* the KD-tree?

Trying to create a KNN search using a KD-tree. I can form the KD-tree fine (or at least, I believe I can!). My problem is that I am searching to find the closest 2 neighbours to every point in a list of points. So, is there a method to find the K…
Stephen
  • 6,027
  • 4
  • 37
  • 55
0
votes
1 answer

Number of items in an (x,y) interval in (logn)(logn) time

Homework I need to use a data structure + algorithm that returns the number of elements within a range consisting of 2 (x,y) values (i.e. return the number of elements that fall within a rectangular range on an xy plane) in O(logn*logn). I am…
0
votes
1 answer

'search' and all other methods from Biopython.KDTree library gives output as 'None' Although KDTree is created succesfully

Following is my code snippets for creating a KDTree and searching points withing a radius of given center: code snippet: threed_array = np.array(my_list, np.float_) atom_kdtree.set_coords(threed_array) try: print(atom_kdtree.built) …
Sarang
  • 105
  • 1
  • 7
0
votes
0 answers

How to find optimum split panes in k-d tree without brute force

I'm using a k-d tree for spatial partitioning in a ray tracer. When determining where to divide a given rectangular region, I choose the dimension with the longest size of the region and then look for the best split pane by checking all the…
Rouslan
  • 93
  • 1
  • 6
0
votes
1 answer

How can I use the kd-tree file exchange and mex in matlab?

I want to use the file exchange about kd-tree in matlab and search in mathwork site and saw the below m-files but I cant understand how can I mex files. in comments "Kuan-Ting Yu" say: 1. use mex -setup to find your compiler. E.g. VS 2010 2. in…
Ahmad
  • 73
  • 3
  • 13
0
votes
0 answers

Finding nearest neighbour given fields in a few dimensions

I've a 5 dimension point set, and I want to find the point nearest to an incomplete query point. An example query point is (X, X, 34, 45, 66). I was wondering if there is any algorithm, which uses Euclidean distance measure, considers only the…
user3098199
  • 31
  • 1
  • 5
0
votes
1 answer

Creating a KDTree that inserts and visualizes logically

So I was tasked with this homework assignment of constructing a KdTree that has nodes that are type Point2D. First starting on the insert method to make sure nodes were being placed accordingly by x-axis, then constructing the draw() method that…
0
votes
1 answer

Removing element from balanced KD-Tree of two dimensions

I want to remove a element from balanced KD-Tree and Tree remain balance without rebuilding the whole tree. is this possible to balance tree without rebuilding the whole tree ? if yes then how?
Omer Obaid
  • 416
  • 1
  • 6
  • 24
0
votes
2 answers

kdtree training in opencv for ORB feature detector

I am working on real time object recognition using Opancv4android, i am able to detect, extract feature points using ORB detector and descriptor extractor from the image i capture using camera . Now, i want to build a Kdtree and train them with…
Darshan
  • 1,018
  • 10
  • 19
0
votes
1 answer

Impose voxel grid on 3D point cloud

I am working with structured 2.5D and unstructured 3D data, which generally is available in (X,Y,Z) coordinates, i.e. point clouds. Now I want to impose a regular voxel grid onto the data. This is not meant for visualization purposes, but rather for…
Michael
  • 280
  • 2
  • 13
0
votes
1 answer

Installing kdtree on OS X 10.9, failed to compile native extensions

You might run into an issue compiling the kdtree gem's native extensions on your machine. The error might look a bit like the following: X-MacBook-Pro:Pitot X$ sudo gem install kdtree Building native extensions. This could take a while... ERROR: …
Emile Victor
  • 923
  • 1
  • 12
  • 22
0
votes
1 answer

Nasty bug in build-routine of a KD-Tree

I'm currently trying to build a KD-Tree in 2 dimensions (Latitude and Longitude) to query for the nearest coordinate. I push the coordinates (ID, Latitude, Longitude) in a vector and pass this vector in the constructor of my KD-Tree. But when I set…
user2033412
  • 1,950
  • 2
  • 27
  • 47
0
votes
0 answers

c++ k-d tree implementation crashes

I'm trying to implement a simple k-d tree, but I'm either doing something wrong in terms of memory management, or that I'm trying to access something that isn't there (e.i. the program compiles, but crashes when I run it). Here is the part where I…
user1627734
  • 53
  • 1
  • 2
  • 4
0
votes
1 answer

kd-tree BBF algorithm time complexity

I hava 2000 points with 5000 dimensions , and I want to get the nearest neighbour. Now I have some problems , could anybody give a answer. People say , it works good with high dimensions. What's the time complexity ? @param max_nn_chks search is…
karl li
  • 469
  • 1
  • 5
  • 17
0
votes
2 answers

KD Tree alternative/variant for weighted data

I'm using a static KD-Tree for nearest neighbor search in 3D space. However, the client's specifications have now changed so that I'll need a weighted nearest neighbor search instead. For example, in 1D space, I have a point A with weight 5 at 0,…