Ask Your Question
0

compile error in opencv2/flann/lsh_table.h when compiling bgslibrary

asked 2012-07-12 09:31:31 -0600

penfold1972 gravatar image

updated 2012-07-12 10:42:46 -0600

I'm learning about OpenCV and found the bgslibrary for background separation, that I thought I would take for a spin. I get the following error when I try to compile it, and if I am reading it right, it seems like it's having an issue with the flann/lsh_table.h file in OpenCV, so I thought I would post this problem here.

The error is:

In file included from /usr/local/include/opencv2/flann/lshindex.h:49,
                 from /usr/local/include/opencv2/flann/allindices.h:42,
                 from /usr/local/include/opencv2/flann/flannbase.hpp:44,
                 from /usr/local/include/opencv2/flann/flann.hpp:50,
                 from /usr/local/include/opencv/cv.h:69,
                 from /home/scobb/Source/slc/backgroundsubtraction/bgs/updated/bgslibrary-read-only/PreProcessor.h:4,
                 from /home/scobb/Source/slc/backgroundsubtraction/bgs/updated/bgslibrary-read-only/PreProcessor.cpp:1:
/usr/local/include/opencv2/flann/lshtable.h: In member function ‘void cvflann::lsh::LshTable<elementtype>::add(cvflann::Matrix<t>)’:
/usr/local/include/opencv2/flann/lshtable.h:196: error: ‘usespeed_’ was not declared in this scope
make[2]: * [CMakeFiles/bgs.dir/PreProcessor.cpp.o] Error 1
make[1]:  [CMakeFiles/bgs.dir/all] Error 2
make: ** [all] Error 2

The bgslibrary is found at http://code.google.com/p/bgslibrary/ if someone wants to try to compile it themselves. I am using OpenCV-2.4.2 which compiled and installed on my system (Ubuntu Linux) just fine.

Can someone point me in the right direction?

edit If I edit opencv2/flann/lsh_table.h and comment out line 196, bgslibrary compiles. So, I'm pretty sure this is a problem in OpenCV-2.4.2

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
2

answered 2012-07-12 11:03:32 -0600

Vincent Rabaud gravatar image

Thx for reporting the bug. Please use the bug tracker next time though http://code.opencv.org The bug is due to the fact that you are using gcc and C++11 flags. If you don't use those, things will be fine. It got fixed in 9018 and will be fixed in 2.4.3. Thx !

edit flag offensive delete link more

Question Tools

Stats

Asked: 2012-07-12 09:31:31 -0600

Seen: 2,476 times

Last updated: Jul 12 '12