DBoW2

Enhanced hierarchical bag-of-word library for C++

  • 所有者: dorian3d/DBoW2
  • 平台:
  • 許可證: Other
  • 分類:
  • 主題:
  • 喜歡:
    0
      比較:

Github星跟蹤圖

DBoW2

DBoW2 is an improved version of the DBow library, an open source C++ library for indexing and converting images into a bag-of-word representation. It implements a hierarchical tree for approximating nearest neighbours in the image feature space and creating a visual vocabulary. DBoW2 also implements an image database with inverted and direct files to index images and enabling quick queries and feature comparisons. The main differences with the previous DBow library are:

  • DBoW2 classes are templated, so it can work with any type of descriptor.
  • DBoW2 is shipped with classes to directly work with ORB or BRIEF descriptors.
  • DBoW2 adds a direct file to the image database to do fast feature comparison. This is used by DLoopDetector.
  • DBoW2 does not use a binary format any longer. On the other hand, it uses the OpenCV storage system to save vocabularies and databases. This means that these files can be stored as plain text in YAML format, making compatibility easier, or compressed in gunzip format (.gz) to reduce disk usage.
  • Some pieces of code have been rewritten to optimize speed. The interface of DBoW2 has been simplified.
  • For performance reasons, DBoW2 does not support stop words.

DBoW2 requires OpenCV and the Boost::dynamic_bitset class in order to use the BRIEF version.

DBoW2, along with DLoopDetector, has been tested on several real datasets, yielding an execution time of 3 ms to convert the BRIEF features of an image into a bag-of-words vector and 5 ms to look for image matches in a database with more than 19000 images.

Citing

If you use this software in an academic work, please cite:

@ARTICLE{GalvezTRO12,
  author={G\'alvez-L\'opez, Dorian and Tard\'os, J. D.},
  journal={IEEE Transactions on Robotics},
  title={Bags of Binary Words for Fast Place Recognition in Image Sequences},
  year={2012},
  month={October},
  volume={28},
  number={5},
  pages={1188--1197},
  doi={10.1109/TRO.2012.2197158},
  ISSN={1552-3098}
}

}

Usage notes

Weighting and Scoring

DBoW2 implements the same weighting and scoring mechanisms as DBow. Check them here. The only difference is that DBoW2 scales all the scores to [0..1], so that the scaling flag is not used any longer.

Save & Load

All vocabularies and databases can be saved to and load from disk with the save and load member functions. When a database is saved, the vocabulary it is associated with is also embedded in the file, so that vocabulary and database files are completely independent.

You can also add the vocabulary or database data to any file opened with a cv::FileStorage structure.

You can save the vocabulary or the database with any file extension. If you use .gz, the file is automatically compressed (OpenCV behaviour).

Implementation notes

Template parameters

DBoW2 has two main classes: TemplatedVocabulary and TemplatedDatabase. These implement the visual vocabulary to convert images into bag-of-words vectors and the database to index images. These classes are templated:

template<class TDescriptor, class F>
class TemplatedVocabulary
{
  ...
};

template<class TDescriptor, class F>
class TemplatedDatabase
{
  ...
};

Two classes must be provided: TDescriptor is the data type of a single descriptor vector, and F, a class with the functions to manipulate descriptors, derived from FClass.

For example, to work with ORB descriptors, TDescriptor is defined as cv::Mat (of type CV_8UC1), which is a single row that contains 32 8-bit values. When features are extracted from an image, a std::vector<TDescriptor> must be obtained. In the case of BRIEF, TDescriptor is defined as boost::dynamic_bitset<>.

The F parameter is the name of a class that implements the functions defined in FClass. These functions get TDescriptor data and compute some result. Classes to deal with ORB and BRIEF descriptors are already included in DBoW2. (FORB, FBrief).

Predefined Vocabularies and Databases

To make it easier to use, DBoW2 defines two kinds of vocabularies and databases: OrbVocabulary, OrbDatabase, BriefVocabulary, BriefDatabase. Please, check the demo application to see how they are created and used.

主要指標

概覽
名稱與所有者dorian3d/DBoW2
主編程語言C++
編程語言CMake (語言數: 2)
平台
許可證Other
所有者活动
創建於2014-10-26 19:40:38
推送於2021-11-24 11:28:16
最后一次提交2020-05-12 16:09:09
發布數3
最新版本名稱v1.1-free (發布於 )
第一版名稱v1.0 (發布於 )
用户参与
星數0.9k
關注者數36
派生數378
提交數46
已啟用問題?
問題數46
打開的問題數23
拉請求數6
打開的拉請求數7
關閉的拉請求數15
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?