dorian3d / DBoW2

Enhanced hierarchical bag-of-word library for C++
Other
851 stars 367 forks source link

which opencv version is needed for brief feature support #20

Closed Exception4U closed 7 years ago

Exception4U commented 7 years ago

I am getting following error while build

In file included from /home/iiith/codes/DBoW2/dependencies/src/DLib/src/DVision/BRIEF.cpp:13:0: /home/iiith/codes/DBoW2/dependencies/src/DLib/include/DVision/BRIEF.h:100:23: error: ‘KeyPoint’ is not a member of ‘cv’ const std::vector &points, ^ /home/iiith/codes/DBoW2/dependencies/src/DLib/include/DVision/BRIEF.h:100:23: error: ‘KeyPoint’ is not a member of ‘cv’ /home/iiith/codes/DBoW2/dependencies/src/DLib/include/DVision/BRIEF.h:100:35: error: template argument 1 is invalid const std::vector &points, ^ /home/iiith/codes/DBoW2/dependencies/src/DLib/include/DVision/BRIEF.h:100:35: error: template argument 2 is invalid /home/iiith/codes/DBoW2/dependencies/src/DLib/include/DVision/BRIEF.h:118:23: error: ‘KeyPoint’ is not a member of ‘cv’ const std::vector &points, ^ /home/iiith/codes/DBoW2/dependencies/src/DLib/include/DVision/BRIEF.h:118:23: error: ‘KeyPoint’ is not a member of ‘cv’ /home/iiith/codes/DBoW2/dependencies/src/DLib/include/DVision/BRIEF.h:118:35: error: template argument 1 is invalid const std::vector &points, ^ /home/iiith/codes/DBoW2/dependencies/src/DLib/include/DVision/BRIEF.h:118:35: error: template argument 2 is invalid /home/iiith/codes/DBoW2/dependencies/src/DLib/src/DVision/BRIEF.cpp:42:23: error: ‘KeyPoint’ is not a member of ‘cv’ const std::vector &points, ^ /home/iiith/codes/DBoW2/dependencies/src/DLib/src/DVision/BRIEF.cpp:42:23: error: ‘KeyPoint’ is not a member of ‘cv’ /home/iiith/codes/DBoW2/dependencies/src/DLib/src/DVision/BRIEF.cpp:42:35: error: template argument 1 is invalid const std::vector &points, ^ /home/iiith/codes/DBoW2/dependencies/src/DLib/src/DVision/BRIEF.cpp:42:35: error: template argument 2 is invalid /home/iiith/codes/DBoW2/dependencies/src/DLib/src/DVision/BRIEF.cpp: In member function ‘void DVision::BRIEF::compute(const cv::Mat&, const int&, std::vector<boost::dynamic_bitset<> >&, bool) const’: /home/iiith/codes/DBoW2/dependencies/src/DLib/src/DVision/BRIEF.cpp:77:29: error: request for member ‘size’ in ‘points’, which is of non-class type ‘const int’ descriptors.resize(points.size()); ^ /home/iiith/codes/DBoW2/dependencies/src/DLib/src/DVision/BRIEF.cpp:80:15: error: ‘KeyPoint’ is not a member of ‘cv’ std::vector::const_iterator kit; ^ /home/iiith/codes/DBoW2/dependencies/src/DLib/src/DVision/BRIEF.cpp:80:15: error: ‘KeyPoint’ is not a member of ‘cv’ /home/iiith/codes/DBoW2/dependencies/src/DLib/src/DVision/BRIEF.cpp:80:27: error: template argument 1 is invalid std::vector::const_iterator kit; ^ /home/iiith/codes/DBoW2/dependencies/src/DLib/src/DVision/BRIEF.cpp:80:27: error: template argument 2 is invalid /home/iiith/codes/DBoW2/dependencies/src/DLib/src/DVision/BRIEF.cpp:80:45: error: expected initializer before ‘kit’ std::vector::const_iterator kit; ^ /home/iiith/codes/DBoW2/dependencies/src/DLib/src/DVision/BRIEF.cpp:85:7: error: ‘kit’ was not declared in this scope for(kit = points.begin(); kit != points.end(); ++kit, ++dit) ^ /home/iiith/codes/DBoW2/dependencies/src/DLib/src/DVision/BRIEF.cpp:85:20: error: request for member ‘begin’ in ‘points’, which is of non-class type ‘const int’ for(kit = points.begin(); kit != points.end(); ++kit, ++dit) ^ /home/iiith/codes/DBoW2/dependencies/src/DLib/src/DVision/BRIEF.cpp:85:43: error: request for member ‘end’ in ‘points’, which is of non-class type ‘const int’ for(kit = points.begin(); kit != points.end(); ++kit, ++dit)

Exception4U commented 7 years ago

btw currently i have opencv 2.4.13

hanghoo commented 7 years ago

When I was complie the code, it displays :/home/lenovo/simple_slam_loop_closure/DBoW2/build/dependencies/src/DLib/include/DVision/BRIEF.h:32:28: fatal error: opencv2/core.hpp: No such file or directory

include <opencv2/core.hpp>

I find the hpp file in /usr/include/opencv2/core/, so I change #include <opencv2/core.hpp> to #include <opencv2/core/core.hpp>. But it show the above errors.

dorian3d commented 7 years ago

The current version does not support OpenCV < 3.1 any longer. You may use the previous release DBoW2 v1.0, which supports OpenCV 2.4, but not OpenCV 3.1.