5.0

5.0 | 3 ratings Rate this file 222 downloads (last 30 days) File Size: 10.4 KB File ID: #24607

FAST K-NEAREST NEIGHBOURS SEARCH 3D VERSION

by Luigi Giaccari

 

01 Jul 2009 (Updated 25 Aug 2009)

Code covered by BSD License  

The 3d version of GLTREE

Download Now | Watch this File

File Information
Description

You can find the description at:

http://www.advancedmcode.org/gltree.html

Acknowledgements

The author wishes to acknowledge the following in the creation of this submission:
FAST K-NEAREST NEIGHBORS SEARCH, K-NEAREST NEIGHBOURS AND RADIUS (RANGE) SEARCH

MATLAB release MATLAB 7.8 (R2009a)
Other requirements Should work on all platform, need a mex compiler
Zip File Content  
Other Files BuildGLTree.cpp,
BuildGLTree.m,
DeleteGLTree.cpp,
DeleteGLTree.m,
GLTree.cpp,
GLTree.h,
KNNSearch.cpp,
KNNSearch.m,
license.txt,
TestMexFiles.m
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (7)
01 Jul 2009 Michael Jordan

interesting code. Can you provide an option to disable the print output ("tree #: ...) when building the tree?

01 Jul 2009 Luigi Giaccari

Uh,
I am sorry, those lines are for debug purpose, I forgot to delete them.
A "clean" version is on the way.

04 Jul 2009 Raphael Keller

Hello,
Thank you for the code.
The BuildGLTree.m file needs some slight corrections for this 3D version.
Best,
RK

29 Jul 2009 Johannes Korsawe

Hi Luigi,

i really appreciate your tough work already for the 2d version.

However, there is some bug in your code that results in wrong results whenever the number of query points q does not match the number of data points p. If one adds a number of zeros to make the point numbers match, the code runs correct.

Are you able to fix this?

Best regards,
Johannes

29 Jul 2009 Johannes Korsawe

Hi again,

i have found the erroneous line in KNNSearch.cpp:

instead of
                    pk.x=qp[i];pk.y=qp[i+N];pk.z=qp[i+N+N];
one has to use
                    pk.x=qp[i];pk.y=qp[i+Nq];pk.z=qp[i+Nq+Nq];

Now it's perfectly running. Very well done.

Best regards,
Johannes

29 Jul 2009 Luigi Giaccari

You are right, the bug is generated only when the user choose to return distances. This is why I didn't realize before.

Thank you very much

11 Aug 2009 Syl Vie  
Please login to add a comment or rating.
Updates
01 Jul 2009

Cleaned the output lines in tree costruction

29 Jul 2009

Fixed a bug thanks to Johannes report.

25 Aug 2009

added link

Tag Activity for this File
Tag Applied By Date/Time
aerospace Luigi Giaccari 01 Jul 2009 12:27:42
automotive Luigi Giaccari 01 Jul 2009 12:27:42
communications Luigi Giaccari 01 Jul 2009 12:27:42
control design Luigi Giaccari 01 Jul 2009 12:27:42
data export Luigi Giaccari 01 Jul 2009 12:27:42
data import Luigi Giaccari 01 Jul 2009 12:27:42
finance Luigi Giaccari 01 Jul 2009 12:27:42
gui Luigi Giaccari 01 Jul 2009 12:27:42
image processing Luigi Giaccari 01 Jul 2009 12:27:42
mathematics Luigi Giaccari 01 Jul 2009 12:27:42
measurement Luigi Giaccari 01 Jul 2009 12:27:42
optimization Luigi Giaccari 01 Jul 2009 12:27:42
kdtre Luigi Giaccari 01 Jul 2009 12:27:42
simulation Luigi Giaccari 01 Jul 2009 12:27:42
simulink Luigi Giaccari 01 Jul 2009 12:27:42
statistics Luigi Giaccari 01 Jul 2009 12:27:42
nearest Luigi Giaccari 01 Jul 2009 12:27:42
closest Luigi Giaccari 01 Jul 2009 12:27:42
neighbors Luigi Giaccari 01 Jul 2009 12:27:42
knn Luigi Giaccari 01 Jul 2009 12:27:42
ann Luigi Giaccari 01 Jul 2009 12:27:42
signal processing Luigi Giaccari 01 Jul 2009 12:27:42
kdtree Luigi Giaccari 01 Jul 2009 13:57:35
kdt Luigi Giaccari 02 Jul 2009 09:38:07
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com