dorian3d/DBoW2

which opencv version is needed for brief feature support

Exception4U opened this issue · 3 comments

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::vectorcv::KeyPoint &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::vectorcv::KeyPoint &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::vectorcv::KeyPoint &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::vectorcv::KeyPoint &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::vectorcv::KeyPoint &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::vectorcv::KeyPoint &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::vectorcv::KeyPoint::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::vectorcv::KeyPoint::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::vectorcv::KeyPoint::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)

btw currently i have opencv 2.4.13

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.

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.