dorian3d / dloopdetector Goto Github PK
View Code? Open in Web Editor NEWFast loop detector for sequences of monocular images
License: Other
Fast loop detector for sequences of monocular images
License: Other
I am not sure if it's a bug or not. I always stick to "Loading BRIEF vocabulary..." and then nothing happens. How long does it usually take?
Thanks.
I found that the latest DBoW2 has removed DVision and Boost dependencies, but this DLoopDetector repo still depends on them.
Moreover, it compiled failed with the latest DBoW2.
The main reason about it is that FBrief::TDescriptor
in the latest DBoW2 has been changed to std::bitset<L>
from boost::dynamic_bitset<>
.
Appreciate it if you could update it to the latest DBoW2.
Thanks!
Hi, this is more of a question, I tried to go through source code but I am still unsure about whether the loop detection Id that we get from result.match is 0 indexed or 1 indexed?
Thanks!
The parameters are multiplied by a frequency factor here :
template <class TDescriptor, class F>
void LoopCloser<TDescriptor,F>::Parameters::set(float f)
{
dislocal =10 * f;
max_db_results = 100 * f;
min_nss_factor = 0.005;
min_matches_per_group = f;
max_intragroup_gap = 5 * f;
max_distance_between_groups = 3 * f;
max_distance_between_queries = 2 * f;
min_Fpoints = 8; // 12 for fundamental.
max_ransac_iterations = 1000;
ransac_probability = 0.70;
max_reprojection_error = 3.0;
max_neighbor_ratio = 0.6;
}
When I make the Kintinuous, I was confronted with the following linking errors:
undefined reference to DBoW2::FSurf64::toMat32F(std::vector<std::vector<float, std::allocator >, std::allocator<std::vector<float, std::allocator > > > const&, cv::Mat&)' undefined reference toDBoW2::FSurf64::distance(std::vector<float, std::allocator > const&, std::vector<float, std::allocator > const&)'
undefined reference to DBoW2::FSurf64::meanValue(std::vector<std::vector<float, std::allocator > const*, std::allocator<std::vector<float, std::allocator > const*> > const&, std::vector<float, std::allocator >&)' undefined reference toDBoW2::FSurf64::toString[abi:cxx11](std::vector<float, std::allocator > const&)'
I have install the DLib, DBoW2, DLoopDetector,again. and I don‘t know why? I think the directory is right for linker.
the directory are as follows:
DBoW2_DIR */usr/local/lib/cmake/DBoW2
DBoW2_INCLUDE_DIR */usr/local/include/DBoW2
DBoW2_LIBRARY */usr/local/lib/libDBoW2.so
DLib_DIR */usr/local/lib/cmake/DLib
DLib_INCLUDE_DIR */usr/local/include/DLib
DLib_LIBRARY */usr/local/lib/libDLib.so
DLoopDetector_DIR */usr/local/lib/cmake/DLoopDetector
DLoopDetector_INCLUDE_DIR */usr/local/include/DLoopDetector
DLoopDetector_LIBRARY *DLoopDetector_LIBRARY-NOTFOUND
my os is ubuntu16.04, the version for opencv is 2.4.13.
So could someone know reasons for these errors?
Since the package provides some resources to run the demo_brief, but the link provided in the CMakeLists.txt : http://doriangalvez.com/resources/DLoopDetector/resources.tar.gz, is not available, may be because the author modified his personal website.
But I found the sources from http://webdiis.unizar.es/~dorian/index.php?p=33. Now I am trying to download from this link and run the demo. If I succeed I will report here.
Thanks.
Hello @dorian3d,
First of all thank you for this great library.
I modified the demo.cpp in DBoW2 that works on Orb to train feature vectors in order to generate a vocabulary similar to the one used in DLoopDetector.
Here are the two functions I'm using:
void loadFeatures(vector<vector<BRIEF::bitset > > &features)
{
features.clear();
features.reserve(NIMAGES);
cout << "Extracting BRIEF features..." << endl;
for(int i = 1; i < 25; ++i)
{
stringstream ss;
ss << "/home/thesidjway/train2/DBoW2/build/brief_train/frame" << setfill('0') << setw(4) << i << ".jpg";
cout << ss.str() << endl;
cv::Mat image = cv::imread(ss.str(), 0);
cv::Mat mask;
vector<cv::KeyPoint> keypoints, kpt;
cv::Mat descriptors;
vector<BRIEF::bitset> descriptors_1;
DVision::BRIEF m_brief;
cv::FAST(image, kpt, 20, true);
m_brief.compute(image, kpt, descriptors_1);
features.push_back(descriptors_1);
}
}
void testVocCreation(const vector<vector<BRIEF::bitset > > &features)
{
// branching factor and depth levels
const int k = 10;
const int L = 6;
const WeightingType weight = TF_IDF;
const ScoringType score = L1_NORM;
BriefVocabulary voc(k, L, weight, score);
cout << "Creating a small " << k << "^" << L << " vocabulary..." << endl;
voc.create(features);
cout << "... done!" << endl;
cout << "Vocabulary information: " << endl
<< voc << endl << endl;
// save the vocabulary to disk
cout << endl << "Saving vocabulary..." << endl;
voc.save("/home/thesidjway/brief_k10L6_edited.voc.gz");
cout << "Done" << endl;
}
The functions compile and run just fine and I am able to output a voc.gz file but when I import the file into the DLoopDetector, it just crashes.
Could you please help me in this regard?
Also can existing vocabularies be appended with new BoWvectors in any way?
I found that when i push the same image into loopdetect twice, two images' keypoints, descriptors and feature vectors are exactly the same, the DBoW2 gives the score 1, but the geometry consistency check is not passed. But if two image is not the same, but very similar, for example DBoW2 score is less than 1, geometry consistency check will pass. This is counterintuitive, cause if two image are the same, means they are infinitely similar to each other, loop detect should return the 'true' flag.
I was use isGeometricallyConsistent_DI() and direct_level is 2.
Although we won't capture two image exactly the same, even in the same spot. But i still want to solve this extreme case. Now, i just skip the geometry consistency if dbow2 score are very large. Is there a better way to solve this?
hello,I have successfully complied the code(use cmake+make),but I don't know how to execute?
make does not work on this project.
My environment Ubuntu 14.04, DBoW2, DLib installed
but DLoopDetector cmake does not work
more specifically I call
mkdir build
cd build
cmake ..
make
or
make all :- make command does nothing at all. please advise.
Hola, muy buenas noches, tengo un problema al momento de ejecutar demo_brief.cpp, me sale el siguiente error:
demo_brief.cpp: In function ‘int main()’:
demo_brief.cpp:76:20: error: cannot declare variable ‘extractor’ to be of abstract type ‘BriefExtractor’
BriefExtractor extractor(BRIEF_PATTERN_FILE);
^
demo_brief.cpp:41:7: note: because the following virtual functions are pure within ‘BriefExtractor’:
class BriefExtractor: public FeatureExtractorFBrief::TDescriptor
^
In file included from demo_brief.cpp:22:0:
demoDetector.h:44:16: note: void FeatureExtractor::operator()(const cv::Mat&, std::vectorcv::KeyPoint&, std::vector<_Tp>&) const [with TDescriptor = std::bitset<256ul>]
virtual void operator()(const cv::Mat &im,
Al principio pensaba que me faltaba el boost::dynamic_bitset pero ya la tengo instalada.
Por cierto estoy utilizando ubuntu 16.4.10 y opencv 3.1.
Muchas gracias por su atención y una disculpa si le hablo en español
I got compile error with following statement
BriefLoopDetector bld;
bld.getDatabase().load("file"); // this line always introduces compile error
the error message is
error: passing ‘const DBoW2::TemplatedDatabase<DUtils::dynamic_bitset<>, DBoW2::FBrief>
’ as ‘this’ argument of ‘void DBoW2::TemplatedDatabase<TDescriptor, F>::load(const
string&) [with TDescriptor = DUtils::dynamic_bitset<>; F = DBoW2::FBrief; std::string
= std::basic_string<char>]’ discards qualifiers [-fpermissive]
bls.getDatabase().load("file");
but I don't understand what's wrong with my code...
Any idea is appreciated, thanks.
The file http://doriangalvez.com/resources/DLoopDetector/resources.tar.gz does no longer exist, can you help to provide the new link to get the resources?
Hi,
I want to use the function getMatches_neighratio(const vectorcv::Mat& A, const vector& i_A,
const vectorcv::Mat& B, const vector& i_B,
vector &i_match_A, vector &i_match_B), in my loop detection application which use ORB descriptor,but I found sometimes values in i_A would exceed the A's size ,how to fix it?
Thanks very much for your code. Just curious about the principle of your code.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.