{"id":19855822,"url":"https://github.com/cuixing158/dbow3","last_synced_at":"2026-05-06T14:38:45.454Z","repository":{"id":257437720,"uuid":"596000355","full_name":"cuixing158/DBOW3","owner":"cuixing158","description":"用于在MATLAB中使用DBOW3算法做SLAM回环检测/图像相似度检测/图像检索","archived":false,"fork":false,"pushed_at":"2025-02-02T04:23:24.000Z","size":633,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-23T15:03:26.416Z","etag":null,"topics":["algorithms","dbow","image-retrieval","loop-detection","matlab","opencv","slam"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cuixing158.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"lfx_crowdfunding":null,"polar":null,"buy_me_a_coffee":null,"thanks_dev":null,"custom":"https://raw.githubusercontent.com/cuixing158/OpticalFlow-Visualization/refs/heads/main/README_media/sponsors.jpg"}},"created_at":"2023-02-01T08:54:50.000Z","updated_at":"2025-10-12T12:00:26.000Z","dependencies_parsed_at":"2024-09-16T19:13:50.856Z","dependency_job_id":"d3ff0b52-3bad-4f08-bd4c-e969ea4a714d","html_url":"https://github.com/cuixing158/DBOW3","commit_stats":null,"previous_names":["cuixing158/dbow3"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cuixing158/DBOW3","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cuixing158%2FDBOW3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cuixing158%2FDBOW3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cuixing158%2FDBOW3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cuixing158%2FDBOW3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cuixing158","download_url":"https://codeload.github.com/cuixing158/DBOW3/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cuixing158%2FDBOW3/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32698845,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-06T08:33:17.875Z","status":"ssl_error","status_checked_at":"2026-05-06T08:33:17.221Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["algorithms","dbow","image-retrieval","loop-detection","matlab","opencv","slam"],"created_at":"2024-11-12T14:13:48.813Z","updated_at":"2026-05-06T14:38:45.434Z","avatar_url":"https://github.com/cuixing158.png","language":"C++","funding_links":["https://raw.githubusercontent.com/cuixing158/OpticalFlow-Visualization/refs/heads/main/README_media/sponsors.jpg"],"categories":[],"sub_categories":[],"readme":"# MATLAB版本DBOW3回环检测库(图像相似度检测)\n\n[![Sponsor](https://img.shields.io/badge/-Sponsor-red?style=for-the-badge\u0026logo=GitHub-Sponsors\u0026logoColor=white)](https://raw.githubusercontent.com/cuixing158/OpticalFlow-Visualization/refs/heads/main/README_media/sponsors.jpg)\n[![View DBOW3 on File Exchange](https://www.mathworks.com/matlabcentral/images/matlab-file-exchange.svg)](https://www.mathworks.com/matlabcentral/fileexchange/172775-dbow3)\n\n## Overview\n\n本库由于MATLAB计算机视觉工具箱(Computer Vision Toolbox™)中内置系列对象函数[`invertedImageIndex`](https://www.mathworks.com/help/vision/ref/invertedimageindex.html)对于SLAM回环检索（图像相似度）能力相对较弱，故本库利用DBOW3算法优势，**支持MATLAB中`mex`文件自动构建，C/C++代码生成直接映射到此库源代码，支持返回图片的相似度top-k排序，使用方便。**\n\n## 说明\n\n本库额外增加了[`mex/`](./mex)、[`c_file/`](./c_file)文件目录，分别用于`mex`构建和C/C++代码生成的入口函数。还增加了Dockfile文件构建镜像，方便部署自动构建。\n\n## Requirements\n\n- MATLAB®\n- OpenCV(C++)\n- C++ Compiler (e.g., GCC, Clang, or MSVC)\n\n## How to use\n\n```bash\ngit clone https://github.com/cuixing158/DBOW3.git\ncd DBOW3\nmkdir build  \ncd build\ncmake ..\nmake\n```\n\n然后你可以在`./build/mex/`文件夹下得到适用于你平台的mex文件，可在MATLAB中直接当作“内置函数”使用。使用简要语法为：\n\n```matlab\n% matlab中对应的语法为：\nloopDatabase(imageFileList,\"init\"); % 对imageFileList文本文件中每行图像文件进行特征提取和用于创建词袋，仅执行一次即可\nloopDatabase(dbFile,\"load\"); % 对dbFile文件加载为database，仅执行一次即可\nloopDatabase(image,\"add\"); % 用于循环中，不断添加图像image的特征\nresult = loopDatabase(image,\"query\"); % 用于循环中，用于适当时候做检索任务,result为10*2大小矩阵，每行形如[queryID,score]。\nloopDatabase(\"aaa\",\"unclock\");% 可取消mexUnlock占用，删除mex文件\n```\n\n具体可以参阅[`loopDatabase.cpp`](./mex/loopDatabase.cpp)接口文件。\n\n## invertedImageIndex类图\n\n在MATLAB中内置`invertedImageIndex`类型用于将视觉单词映射到图像的搜索索引，下面的类图较为清晰的展开了相关函数属性关系。\n\n```mermaid\nclassDiagram\n %% +即public；-即private；#即protected；~即Package/Internal\n        InvertedImageIndex ..\u003e bagofFeatures: Dependency\n        class InvertedImageIndex{\n         +cell array ImageLocation\n         +vector ImageWords\n         +double array WordFrequency\n         +bagOfFeatures BagOfFeatures\n         +double array ImageID\n         +double MatchThreshold\n         +double array WordFrequencyRange\n         +addImages()\n         +addImagesFeatures()\n         +removeImages()\n        }\n        \n        %% bagofFeatures的属性和方法\n        bagofFeatures..\u003eimageDatasotre:Dependence\n        class bagofFeatures{\n            \u003c\u003cInterface\u003e\u003e\n            +String CustomExtractor\n            +double NumVisualWords\n            +double array TreeProperties\n            +double StrongestFeatures\n            +encode() double array\n        }\n\n        retrieveImages..\u003eInvertedImageIndex: Dependency\n        retrieveImages..\u003eindexImages: Dependency\n         class retrieveImages{\n            +retrieveImages() \n        }\n\n        indexImages..\u003eimageDatasotre: Dependency\n        indexImages --o bagofFeatures:Aggregation\n         class indexImages{\n            +indexImages() InvertedImageIndex\n        }\n\n        %% InvertedImageIndex --o imageDatasotre:Aggregation\n        class imageDatasotre{\n            \u003c\u003cInterface\u003e\u003e\n            +Files\n            +Folders\n            +AlternateFileSystemRoots\n            +ReadSize\n            +Labels\n            +SupportedOutputFormats\n            +DefaultOutputFormat\n        }\n```\n\n## DBOW3\n\nDBOW3方法在loopclosure detection中某个数据集的表现，采用top9可视化：\u003cbr\u003e\n\n![DBOW3_matlab_orbFeatures_add_queryIdx300](images/DBOW3_matlab_orbFeatures_add_queryIdx300.jpg)\n\n## References\n\n1. [MATLAB MEX file For C/C++ code generation](https://github.com/cuixing158/mex-file)\u003cbr\u003e\n1. [基于CMake交叉编译C++得到适用与Matlab的Mex加速库文件](https://github.com/cuixing158/MexCmake)\u003cbr\u003e\n1. [DBOW3](https://github.com/rmsalinas/DBow3)\u003cbr\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcuixing158%2Fdbow3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcuixing158%2Fdbow3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcuixing158%2Fdbow3/lists"}