Unable to run programs of SFM (Structure From Motion) module [closed]
I am getting an error when I am trying to execute a sample code in SFM module. Initially SFM was not present in my contrib directory. So i downloaded the latest contrib and pasted the sfm folder in my contrib directory. I used the CMakeLists.txt that was present in the sfm module. Then I tried to build it in my own directory with scene_reconstruction.cpp and the CMakeLists.txt which I took from the sfm module. Following is the error which I am getting
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found installed version of Eigen: /usr/lib/cmake/eigen3
-- Found required Ceres dependency: Eigen version 3.2.92 in /usr/include/eigen3
-- Found required Ceres dependency: glog
-- Performing Test GFLAGS_IN_GOOGLE_NAMESPACE
-- Performing Test GFLAGS_IN_GOOGLE_NAMESPACE - Success
-- Found required Ceres dependency: gflags
-- Found Ceres version: 1.13.0 installed in: /usr/local with components: [LAPACK, SuiteSparse, SparseLinearAlgebraLibrary, CXSparse, SchurSpecializations, OpenMP]
-- Checking SFM deps... TRUE
-- Module opencv_sfm disabled because the following dependencies are not found: Eigen
CMake Error at CMakeLists.txt:35 (ocv_module_disable):
Unknown CMake command "ocv_module_disable".
CMake Warning (dev) in CMakeLists.txt:
No cmake_minimum_required command is present. A line of code such as
cmake_minimum_required(VERSION 3.5)
should be added at the top of the file. The version specified may be lower
if you wish to support older CMake versions for this project. For more
information run "cmake --help-policy CMP0000".
This warning is for project developers. Use -Wno-dev to suppress it.
-- Configuring incomplete, errors occurred!
PS: I went through all the required downloads of the libraries mentioned in the SFM documentation page before starting off.
If you want to use opencv_contrib you have to clone lastest opencv version from github
I used opencv-3.2.0 and opencv_contrib-3.2.0. I also meet this error -- Module opencv_sfm disabled because the following dependencies are not found: Eigen CMake Error at CMakeLists.txt:35 (ocv_module_disable): Unknown CMake command "ocv_module_disable".
However, I already install Eigen 3.2.92
I think there is a problem in cmakelist of sfm module. When you run cmake try to set -DEIGEN_INCLUDE_PATH=/usr/include/eigen3
i already added set(EIGEN_INCLUDE_PATH ${EIGEN_INCLUDE_PATH} $/usr/include/eigen3) in line 26. But it still give me this error. I have checked /usr/include/eigen3, eigen3 exists.
so try -DEIGEN_INCLUDE_PATH=/usr/include/eigen3 -DEIGEN_INCLUDE_DIR=/usr/include/eigen3
I tried cmake -DEIGEN_INCLUDE_PATH=/usr/include/eigen3 -DEIGEN_INCLUDE_DIR=/usr/include/eigen3 .. and cmake -DOPENCV_EXTRA_MODULES_PATH=~/opencv_contrib-3.2.0/modules -DEIGEN_INCLUDE_PATH=/usr/include/eigen3/ .. Both of them give me the same error :(
delete cmake_cache.txt