R树在matlab中的实现

发布于 2024-08-18 14:24:33 字数 99 浏览 7 评论 0原文

请任何人告诉我如何在matlab中实现R树结构来加速图像检索系统,我想告诉你我的数据库空间是颜色直方图(多维)的特征向量,并且还有一个距离向量用于相似性测量...

谢谢

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

謌踐踏愛綪 2024-08-25 14:24:33

我不用Matlab。所以我不知道 Matlab 中与索引结构相关的成本是多少。它似乎不是为此类事情而设计的。

R 树似乎有很大的不同。从http://elki.dbs.ifi.lmu.de/wiki/Benchmarking 一些算法可以从良好的索引结构中受益匪浅。在 110250 图像颜色直方图数据集上,该网页上的数字要快 5 到 7 倍。

根据我的经验,R 树确实很难做到正确。但前提是你想走完全程。如果您有一个静态数据库,您可以轻松地使用批量加载 R-Tree。批量加载和查询都不是很难做到的。一旦您想要使用复杂的分割策略、重新插入、平衡来进行 R*-Tree 优化,并且通过智能缓存在磁盘上高效地完成所有这些操作,R-Tree 就会变得混乱。但只要您在内存中操作并且不动态添加对象,STR 批量加载的 R 树就会有很大帮助并且更容易实现。

在已经有可用的 R 树的基础上进行构建可能会更好。说SQLite与上面提到的rtree模块或ELKI。

I don't use Matlab. So I do not have any idea how much cost is associated in Matlab with index structures. It doesn't appear to be designed for such things.

R-Trees seem to make quite a difference. Judging from http://elki.dbs.ifi.lmu.de/wiki/Benchmarking some algorithms can benefit immensely from having a good index structure. The numbers on that web page are 5 to 7 times faster on a 110250 image color histogram data set.

From my experience, R-Trees can indeed be quite hard to get right. But only if you want to go the full way. If you have a static database, you can get easily away with a bulk loaded R-Tree. Neither the bulk loading nor the queries are very hard to do. R-Trees get messy once you want to do the R*-Tree optimizations with complex split strategies, reinsertions, balancing, and do all this efficiently and on-disk with smart caching. But as long as you are operating in-memory and do not dynamically add objects, a STR bulk-loaded R-tree will help a lot and be a lot easier to implement.

You might still be better off building on something that has already a working R-Tree. Say SQLite with the rtree module or ELKI mentioned above.

浅语花开 2024-08-25 14:24:33

实现 R 树并不是一个简单的任务。您可以使用 Matlab 绑定 LidarK 库,它应该足够快。代码在这里:
http://graphics.cs.msu.ru/en/science/research /3dpoint/lidark

如果您决定使用 kd-tree(这是图像检索的典型),也有一个很好的实现。
http://www.cs.ubc.ca/~mariusm/index .php/FLANN/FLANN

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

三寸金莲 2024-08-25 14:24:33

我对 R 树不太熟悉,但一般来说树是动态数据结构。 Matlab 并不真正处理动态数据结构,除非您开始使用它的面向对象工具。如果您不想这样做,您可以将树展平为元胞数组。例如,我将编写一个(严格的)二叉树,并将其展平为元胞数组,这将节省我绘制树的麻烦。这里是:

{1,{2},{3}}

它代表一个二叉树,根为 1,分支向左为 2,向右为 3。我可以使其更深:

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

这为前一棵树添加了另一个级别。如果您想在任何节点添加数据,那么您的(第一)树可能如下所示:

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

另一种选择是单独定义您的节点,就像这样,

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

然后您的树就变成了

{node1, node2, node3}

您的问题然后变成编写函数来构建和以您选择的表示方式遍历树。大多数树函数最好写成递归。任何好的文字和大量的互联网站点都会告诉您有关此类功能的所有信息。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文