Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

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

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/lsh_index.h:49,
                 from /usr/local/include/opencv2/flann/all_indices.h:42,
                 from /usr/local/include/opencv2/flann/flann_base.hpp:44,
                 from /usr/local/include/opencv2/flann/flann.hpp:50,
                 from /usr/local/include/opencv/cv.h:69,
                 from /home/scobb/Source/slc/background_subtraction/bgs/updated/bgslibrary-read-only/PreProcessor.h:4,
                 from /home/scobb/Source/slc/background_subtraction/bgs/updated/bgslibrary-read-only/PreProcessor.cpp:1:
/usr/local/include/opencv2/flann/lsh_table.h: In member function ‘void cvflann::lsh::LshTable<elementtype>::add(cvflann::Matrix<t>)’:
/usr/local/include/opencv2/flann/lsh_table.h:196: error: ‘use_speed_’ 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?

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

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/lsh_index.h:49,
                 from /usr/local/include/opencv2/flann/all_indices.h:42,
                 from /usr/local/include/opencv2/flann/flann_base.hpp:44,
                 from /usr/local/include/opencv2/flann/flann.hpp:50,
                 from /usr/local/include/opencv/cv.h:69,
                 from /home/scobb/Source/slc/background_subtraction/bgs/updated/bgslibrary-read-only/PreProcessor.h:4,
                 from /home/scobb/Source/slc/background_subtraction/bgs/updated/bgslibrary-read-only/PreProcessor.cpp:1:
/usr/local/include/opencv2/flann/lsh_table.h: In member function ‘void cvflann::lsh::LshTable<elementtype>::add(cvflann::Matrix<t>)’:
/usr/local/include/opencv2/flann/lsh_table.h:196: error: ‘use_speed_’ 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.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