Open ariel9874 opened 6 years ago
@ariel9874, same as mine, have you solved it?
@ariel9874, same as mine, have you solved it?
I can already run this program. You need to change the vector
@ariel9874, same as mine, have you solved it?
I can already run this program. You need to change the vectorBRIEF::bitset in the declaration of the virtual function operator() in demo_brief.cpp to vectorFBrief::TDescripyor. Then, m_brief.compute(im,keys,(vectorBRIEF::bitset&)(descriptors))
@TeslaHua I have the same problem, but couldn't solve it with your solution. May I ask am I right?
I changed BRIEF::bitset
to FBrief::TDescriptor
.
I got this error:
[ 50%] Building CXX object CMakeFiles/demo_brief.dir/demo/demo_brief.cpp.o /home/jun/Dropbox/cpp_ws/DLoopDetector_origin/DLoopDetector/demo/demo_brief.cpp: In member function ‘virtual void BriefExtractor::operator()(const cv::Mat&, std::vector<cv::KeyPoint>&, std::vector<std::bitset<256ul> >&) const’: /home/jun/Dropbox/cpp_ws/DLoopDetector_origin/DLoopDetector/demo/demo_brief.cpp:99:40: error: no matching function for call to ‘DVision::BRIEF::compute(const cv::Mat&, std::vector<cv::KeyPoint>&, std::vector<std::bitset<256ul> >&) const’ m_brief.compute(im, keys, descriptors); ^ /home/jun/Dropbox/cpp_ws/DLoopDetector_origin/DLoopDetector/demo/demo_brief.cpp:99:40: note: candidate is: In file included from /home/jun/Dropbox/cpp_ws/DLoopDetector_origin/DLoopDetector/build/dependencies/install/include/DLib/../DVision/DVision.h:42:0, from /home/jun/Dropbox/cpp_ws/DLoopDetector_origin/DLoopDetector/include/DLoopDetector/TemplatedLoopDetector.h:28, from /home/jun/Dropbox/cpp_ws/DLoopDetector_origin/DLoopDetector/include/DLoopDetector/DLoopDetector.h:54, from /home/jun/Dropbox/cpp_ws/DLoopDetector_origin/DLoopDetector/demo/demo_brief.cpp:15: /home/jun/Dropbox/cpp_ws/DLoopDetector_origin/DLoopDetector/build/dependencies/install/include/DLib/../DVision/BRIEF.h:118:8: note: void DVision::BRIEF::compute(const cv::Mat&, const std::vector<cv::KeyPoint>&, std::vector<boost::dynamic_bitset<> >&, bool) const void compute(const cv::Mat &image, ^ /home/jun/Dropbox/cpp_ws/DLoopDetector_origin/DLoopDetector/build/dependencies/install/include/DLib/../DVision/BRIEF.h:118:8: note: no known conversion for argument 3 from ‘std::vector<std::bitset<256ul> >’ to ‘std::vector<boost::dynamic_bitset<> >&’ make[2]: *** [CMakeFiles/demo_brief.dir/demo/demo_brief.cpp.o] Error 1 make[1]: *** [CMakeFiles/demo_brief.dir/all] Error 2 make: *** [all] Error 2
@junzhang2016 I had the same error. Have you solved it?
@SarahGao-1995
Hi, yes, I solved. Please refer to this issue:
https://github.com/dorian3d/DLoopDetector/issues/16
@junzhang2016 Thanks, I modified the CMakeLists.txt as methoned in #16. but another error occured. [ 88%] Completed 'DBoW2' [ 88%] Built target DBoW2 Scanning dependencies of target demo_brief [ 94%] Building CXX object CMakeFiles/demo_brief.dir/demo/demo_brief.cpp.o /home/gs/GS_doc/4_codes/loop_closing/DLoopDetector-master/demo/demo_brief.cpp:14:10: fatal error: DBoW2/DBoW2.h: No such file or directory
^~~~~~~~~~~~~~~
compilation terminated.
So, did you modify the CMakeLists.txt and demo_brief.cpp at the same time?
@SarahGao-1995 Did you get any solution for above error?
@KratikaVarshney08
yes, I solved by changing the declaration of the virtual function operator() in demo_brief.cpp to virtual void operator()(const cv::Mat &im, vector<cv::KeyPoint> &keys, vector<FBrief::TDescriptor> &descriptors) const;
and in the function BriefExtractor::operator() I converted the type of descriptors
in last line like this m_brief.compute(im, keys, (vector<BRIEF::bitset>&)(descriptors));
Thanks @SarahGao-1995 Do you know how do we get precision and recall curves/value in above code?
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 FeatureExtractor
^
In file included from demo_brief.cpp:22:0:
demoDetector.h:44:16: note: void FeatureExtractor::operator()(const cv::Mat&, std::vector&, 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