Search Comments and Ratings

go

Comments and Ratings

   
Date File Comment by Comment Rating
26 Oct 2009 kd-tree for matlab A kd-tree mex implementation which allows for nearest neighbor, k-nearest neighbor, range and ball q Author: Andrea Tagliasacchi Dominic

Ok, Shame on me, there is a method

"kdtree_delete"

that needs to be called for releasing the memory again.

22 Oct 2009 kd-tree for matlab A kd-tree mex implementation which allows for nearest neighbor, k-nearest neighbor, range and ball q Author: Andrea Tagliasacchi Dominic

On my System (64bit Ubuntu, Matlab R2009a) there seems to be a memory leak with this implementation:

for i = 1:1000
tree = kdtree_build(rand(1000,1));
end

grabs around 140MB of system memory, according to top. That is never released again. Do I have to release the resources myself in some way or might this be a bug?
I really depend on this implementation, so you would do me a great favour by having a look at it...

15 Oct 2009 kd-tree for matlab A kd-tree mex implementation which allows for nearest neighbor, k-nearest neighbor, range and ball q Author: Andrea Tagliasacchi Dominic

Thanks a lot for this contribution - I've been using it a lot recently and it just works perfectly :)

09 Sep 2009 kd-tree for matlab A kd-tree mex implementation which allows for nearest neighbor, k-nearest neighbor, range and ball q Author: Andrea Tagliasacchi jin, sun

kdtree_build.cpp
D:\kdtree1.2\kdtree\KDTree.h(144) : error C2374: 'dIdx' : redefinition; multiple initialization
        D:\kdtree1.2\kdtree\KDTree.h(137) : see declaration of 'dIdx'
D:\kdtree1.2\kdtree\KDTree.h(225) : error C2371: 'i' : redefinition; different basic types
        D:\kdtree1.2\kdtree\KDTree.h(223) : see declaration of 'i'
 
  D:\MATLAB\R2008A\BIN\MEX.PL: Error: Compile of 'kdtree_build.cpp' failed.
 
??? Error using ==> mex at 207
Unable to complete successfully.

27 Aug 2009 kd-tree for matlab A kd-tree mex implementation which allows for nearest neighbor, k-nearest neighbor, range and ball q Author: Andrea Tagliasacchi ming, lin

great work!
note: compile with visual c++ 6.0 will cause fatal error on my computer. However, VS2008 works fine.

07 Jul 2009 Priority Queue (MEX/C++) An efficient priority queue implementation in C++ Author: Andrea Tagliasacchi Tagliasacchi, Andrea

1) The C++ library MyHeap.h contains both implementation for MaxHeap and MinHeaps. All you need is to create interface functions along the lines of those I created for the MinHeaps.

2) This would require to add a function in MyHeaps.h but I don't see why not, it should be a very easy operation to do.

3) Position in the tree? Lowest Level?

07 Jul 2009 Priority Queue (MEX/C++) An efficient priority queue implementation in C++ Author: Andrea Tagliasacchi Yates, Kit

This seems like an excellent set of files. A couple of questions.
1) Is it possible to reverse the order of the indexing in order to have the smallest elements at the top (other than the obvious: making all the entries negative when entering them and then converting them back to positive when using them)?
2)Is it possible to access the cost of an element from the priority queue by inputting its index in some way.
3)On a similar note is it possible to access the index and cost of an element by somehow inputting its position in the tree.
i.e. would it be possible to access all the elements on the lowest level.
Thanks, Kit.

17 May 2009 kd-tree for matlab A kd-tree mex implementation which allows for nearest neighbor, k-nearest neighbor, range and ball q Author: Andrea Tagliasacchi Brucker, Florian

Worked perfectly out of the box after compiling in MATLAB as specified by the docs. Thanks a lot!

One little thing: The help for kdtree_k_nearest_neighbors says that the neighbors are returned with increasing distance order. This seems to be incorrect, my experiments tell me they are returned in decreasing distance order (e.g. if the point itself is part of the tree, then it is returned as the last of the neighbors, not as the first).

03 Apr 2009 gif_add_frame creates a gif animation of snapshots Author: Andrea Tagliasacchi Michael

Excellent program. well done.

30 Mar 2009 kd-tree for matlab A kd-tree mex implementation which allows for nearest neighbor, k-nearest neighbor, range and ball q Author: Andrea Tagliasacchi Tagliasacchi, Andrea

kdtree_build() returns a pointer to the kdtree. That number needs to be fed as first argument to every other query method. I haven't tried it on older versions of Matlab but I haven't used any of the new releases functionality.

07 Feb 2009 kd-tree for matlab A kd-tree mex implementation which allows for nearest neighbor, k-nearest neighbor, range and ball q Author: Andrea Tagliasacchi Jian, Bing

How to use the result returned by kdtree_build()
which is a double number on my MATLAB7.5.0?
Does your program require at least MATLAB7.6?
Thanks!

03 Feb 2009 kd-tree for matlab A kd-tree mex implementation which allows for nearest neighbor, k-nearest neighbor, range and ball q Author: Andrea Tagliasacchi Tagliasacchi, Andrea

Thanks Kigor, I found a simple bug in the kdtree_nearest_neighbor data conversion. The query was executed MxN times instead of M times; given the query matrix Q is of size(M,N).

The updated kdtree_nearest_neighbor.cpp file can be found at
https://latis.cs.sfu.ca/svn/users/ata2/matlibs/kdtree/

The bug will be corrected in the next release

21 Jan 2009 kd-tree for matlab A kd-tree mex implementation which allows for nearest neighbor, k-nearest neighbor, range and ball q Author: Andrea Tagliasacchi Karic, KIgor

For some reason kdtree_nearest_neighbor takes extremely long time to finish. Are others having the same problem or am I the only one?

03 Dec 2008 kd-tree for matlab A kd-tree mex implementation which allows for nearest neighbor, k-nearest neighbor, range and ball q Author: Andrea Tagliasacchi Giaccari, Luigi

The most complete Kd-tree on Matlab exchange.
 Thank you Andrea

30 Sep 2008 kd-tree for matlab A kd-tree mex implementation which allows for nearest neighbor, k-nearest neighbor, range and ball q Author: Andrea Tagliasacchi Tam, Gary

Thank you! Work out of the box.

13 Sep 2008 Arcball like 3D figure rotation Example that shows how to add arcball control to a 3D window Author: Andrea Tagliasacchi G, P

The sphere example proposed in the code does not work with Matlab 7.0.0.19920 (R14) and 7.0.4.352 (R14). There may be a problem between surf objects and hgtransform. It works properly with mesh and surface objects. Great work, thanks.

12 May 2008 Arcball like 3D figure rotation Example that shows how to add arcball control to a 3D window Author: Andrea Tagliasacchi Tagliasacchi, Andrea

Thanks for the observation anyway. I took a look at the code again and even though Noh2 observation was correct, there was a similar bug. The "rotation direction" was embedded in model space using the inverse of the current rotation matrix (taken from graphic context) and not the one of the original model.

I will upload the final version.
There was also a vector normalization missing that might have caused other issues.

12 May 2008 Arcball like 3D figure rotation Example that shows how to add arcball control to a 3D window Author: Andrea Tagliasacchi Noh2, Noone U.

Actually that is not true. If you check, the rotation is applied to the model which is "saved" in M_previous in the moment the first mouse click take place. That doesn't change anymore during dragging.

30 Apr 2008 Arcball like 3D figure rotation Example that shows how to add arcball control to a 3D window Author: Andrea Tagliasacchi Noh, Noone U.

The cause of your "bug" is likely that at each step you rotate the object that was rotated in the last step. Each rotation introduces a little bit of round-off errors that are being magnified by doing it a zillion times. Instead, you should always make the rotations with respect to the original (unrotated) object.

 

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