views:

345

answers:

2

Hi

please, any one tell me how we can implement the R-tree structure in matlab to speed the image retrieval system , I would like to inform you that my database space a feature vector of Color Histogram (Multidimensional ) and also I I have a distance vector for similarity measure...

thanks

A: 

Hi

I'm not familiar with R-trees specifically but in general trees are dynamic data structures. Matlab doesn't really do dynamic data structures unless you start using its OO facilities. If you don't want to do that you can flatten your tree into a cell array. For example I'll write a (strictly) binary tree flattened into a cell array, which will save me having to draw a tree. Here goes:

{1,{2},{3}}

which represents a binary tree with root 1 and branches left to 2, right to 3. I can make this deeper:

{1,{2,{5,6}},{3,{7,8}}}

which adds another level to the previous tree. If you want to add data at any of the nodes, then your (first) tree might look like this:

{1,[a b c],{2,[e f]},{3,[h i j k l]}}

An alternative to this would be to define your nodes separately, like this

node1 = [a b c]; node2 = [e f]; node3 = [h i j k l],

then your tree becomes

{node1, node2, node3}

Your problem then becomes writing functions to build and to traverse the tree in your chosen representation. Most tree functions are best written as recursions. Any good text, and lots of Internet sites, will tell you all that you want to know about such functions.

Hope this helps

Regards

Mark

High Performance Mark
Hi Thank you so much for replying I will attempt to apply your opinion
zenab
A: 

Hi

Implementing R-tree is not really a simple task. You can use matlab binding for the LidarK library, it should be fast enough. The code is here: http://graphics.cs.msu.ru/en/science/research/3dpoint/lidark

If you decide to use kd-tree (which is typical for image retrieval), there's a good implementation too. http://www.cs.ubc.ca/~mariusm/index.php/FLANN/FLANN

overrider