rmsalinas / fbow

FBOW (Fast Bag of Words) is an extremmely optimized version of the DBow2/DBow3 libraries.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Convert DBoW3 vocabulary to fbow

hellovuong opened this issue · comments

Hello,
I have a DBoW3 vocabulary and I want to convert it to fbow format to use with this repo, Does anyone knows how to do it? I really appreciate any suggestions and advice!

Hello,bro!
You have great work which uses TBB on ORB_SLAM3. Do you convert your images to DBow3 vocabulary? How to combine it with ORB_SLAM3?

Hello @fightmoney, Thank you for interesting in it. For sure I will do it soon.

Hello @hellovuong, I have the same problem, have you found a solution?

Not sure if this is relevant for anyone here, but I'll provide the solution that worked for me for anyone visiting in the future.

If you check the tests folder, you will see a file called dbow2fbow.cpp. This code can be used to convert DBoW to FBoW vocabularies.

So in the CMakeLists file in tests add the executable ADD_EXECUTABLE(dbow2fbow dbow2fbow.cpp dbow2/ScoringObject.cpp dbow2/BowVector.h dbow2/FClass.h dbow2/FeatureVector.h dbow2/FORB.h dbow2/ScoringObject.h dbow2/TemplatedVocabulary.h).

This will lead to some errors of the form

error: ‘struct DBoW2::TemplatedVocabulary<cv::Mat, DBoW2::FORB>::Node’ is protected within this context

I just changed the corresponding protected keywords to public in TemplatedVocabulary.h.
While it might not be best practice it works.