opencv / opencv_contrib

Repository for OpenCV's extra modules
Apache License 2.0
9.41k stars 5.76k forks source link

Module opencv_sfm disabled because the following dependencies are not found: Glog/Gflags #863

Open OtacilioNeto opened 7 years ago

OtacilioNeto commented 7 years ago
System information (version)
Detailed description

Module opencv_sfm disabled because the following dependencies are not found: Glog/Gflags but I have ceres and glog installed.

Detected version of GNU GCC: 53 (503) CUDA compilation is disabled (due to only Visual Studio compiler supported on your platform). Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) To enable PlantUML support, set PLANTUML_JAR environment variable or pass -DPLANTUML_JAR= option to cmake Could NOT find PythonInterp: Found unsuitable version "2.7.8", but required is at least "3.4" (found C:/Python27/python.exe) Could NOT find PythonInterp: Found unsuitable version "2.7.8", but required is at least "3.2" (found C:/Python27/python.exe) Could NOT find JNI (missing: JAVA_AWT_LIBRARY JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2 JAVA_AWT_INCLUDE_PATH) Could NOT find Matlab (missing: MATLAB_MEX_SCRIPT MATLAB_INCLUDE_DIRS MATLAB_ROOT_DIR MATLAB_LIBRARIES MATLAB_LIBRARY_DIRS MATLAB_MEXEXT MATLAB_ARCH MATLAB_BIN) Found VTK ver. 6.3.0 (usefile: C:/lib/vtk/VTK-6.3.0-src/CMake/UseVTK.cmake) Caffe: NO Protobuf: NO Glog: YES Could NOT find HDF5 (missing: HDF5_INCLUDE_DIRS) Found required Ceres dependency: Eigen version 3.2.8 in C:/lib/eigen/include/eigen3 Found required Ceres dependency: Glog in C:/lib/glog/include Found Ceres version: 1.11.0 installed in: C:/lib/ceres-solver-1.11.0 Module opencv_sfm disabled because the following dependencies are not found: Glog/Gflags

Steps to reproduce

Try build opencv 3.1 on windows 10 64 bit using gcc.

LaurentBerger commented 7 years ago

Hi OtacilioNeto You need GLog and gflags Have you got gflags installed?

Detected version of GNU GCC: 62 (602) FP16: Feature disabled A library with BLAS API not found. Please specify library location. LAPACK requires BLAS A library with LAPACK API not found. Please specify library location. CUDA compilation is disabled (due to only Visual Studio compiler supported on your platform). Could NOT find JNI (missing: JAVA_AWT_LIBRARY JAVA_JVM_LIBRARY JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2 JAVA_AWT_INCLUDE_PATH) Could NOT find Matlab (missing: MATLAB_MEX_SCRIPT MATLAB_INCLUDE_DIRS MATLAB_ROOT_DIR MATLAB_LIBRARIES MATLAB_LIBRARY_DIRS MATLAB_MEXEXT MATLAB_ARCH MATLAB_BIN) VTK is not found. Please set -DVTK_DIR in CMake to VTK build directory, or to VTK install subdirectory with VTKConfig.cmake file Caffe: NO Protobuf: NO Glog: NO Found required Ceres dependency: Eigen version 3.3.0 in f:/lib/eigen-eigen No preference for use of exported glog CMake configuration set, and no hints for include/library directories provided. Defaulting to preferring an installed/exported glog CMake configuration if available. No preference for use of exported gflags CMake configuration set, and no hints for include/library directories provided. Defaulting to preferring an installed/exported gflags CMake configuration if available. Found installed version of gflags: F:/lib/gflags/mingw Detected gflags version: 2.2.0 Found installed version of glog: F:/lib/glog/mingw Detected glog version: 0.3.4 Found required Ceres dependency: Glog in Found Ceres version: 1.12.0 exported from build directory: F:/lib/ceres-solver/buildmingw with components: [SchurSpecializations, OpenMP] Checking SFM deps... TRUE Build libprotobuf from sources: libprotobuf not found into system The protocol buffer compiler not found Tesseract: NO Check contents of vgg_generated_48.i ... Check contents of vgg_generated_64.i ... Check contents of vgg_generated_80.i ... Check contents of vgg_generated_120.i ... Check contents of boostdesc_bgm.i ... Check contents of boostdesc_bgm_bi.i ... Check contents of boostdesc_bgm_hd.i ... Check contents of boostdesc_binboost_064.i ... Check contents of boostdesc_binboost_128.i ... Check contents of boostdesc_binboost_256.i ... Check contents of boostdesc_lbgm.i ... Found required Ceres dependency: Eigen version 3.3.0 in f:/lib/eigen-eigen No preference for use of exported glog CMake configuration set, and no hints for include/library directories provided. Defaulting to preferring an installed/exported glog CMake configuration if available. No preference for use of exported gflags CMake configuration set, and no hints for include/library directories provided. Defaulting to preferring an installed/exported gflags CMake configuration if available. Found installed version of gflags: F:/lib/gflags/mingw Detected gflags version: 2.2.0 Found installed version of glog: F:/lib/glog/mingw Detected glog version: 0.3.4 Found required Ceres dependency: Glog in Found Ceres version: 1.12.0 exported from build directory: F:/lib/ceres-solver/buildmingw with components: [SchurSpecializations, OpenMP] Checking SFM deps... TRUE

General configuration for OpenCV 3.1.0-dev ===================================== Version control: 3.1.0-1700-gfb456eb

Extra modules: Location (extra): F:/lib/opencv_contrib/modules Version control (extra): 3.1.0-469-ga6ca151

Platform: Timestamp: 2016-11-24T19:25:17Z Host: Windows 10.0.14393 AMD64 CMake: 3.7.0-rc2 CMake generator: MSYS Makefiles CMake build tool: F:/mingw-w64/msys64/usr/bin/make.exe Configuration: Release

C/C++: Built as dynamic libs?: YES C++ Compiler: F:/mingw-w64/x86_64-6.2.0-posix-sjlj-rt_v5-rev1/mingw64/bin/g++.exe (ver 6.2.0) C++ flags (Release): -fsigned-char -mstackrealign -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-comment -fdiagnostics-show-option -Wno-long-long -fomit-frame-pointer -msse -msse2 -ffunction-sections -fvisibility=hidden -fvisibility-inlines-hidden -O2 -DNDEBUG -DNDEBUG C++ flags (Debug): -fsigned-char -mstackrealign -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-comment -fdiagnostics-show-option -Wno-long-long -fomit-frame-pointer -msse -msse2 -ffunction-sections -fvisibility=hidden -fvisibility-inlines-hidden -g -O0 -DDEBUG -D_DEBUG C Compiler: F:/mingw-w64/x86_64-6.2.0-posix-sjlj-rt_v5-rev1/mingw64/bin/gcc.exe C flags (Release): -fsigned-char -mstackrealign -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wno-narrowing -Wno-comment -fdiagnostics-show-option -Wno-long-long -fomit-frame-pointer -msse -msse2 -ffunction-sections -fvisibility=hidden -O2 -DNDEBUG -DNDEBUG C flags (Debug): -fsigned-char -mstackrealign -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wno-narrowing -Wno-comment -fdiagnostics-show-option -Wno-long-long -fomit-frame-pointer -msse -msse2 -ffunction-sections -fvisibility=hidden -g -O0 -DDEBUG -D_DEBUG Linker flags (Release):
Linker flags (Debug):
Precompiled headers: YES Extra dependencies: comctl32 gdi32 ole32 setupapi ws2_32 avifil32 avicap32 winmm msvfw32 correspondence multiview numeric glog::glog gflags_shared simple_pipeline 3rdparty dependencies: zlib libjpeg libwebp libpng libtiff libjasper IlmImf libprotobuf

OpenCV modules: To be built: core flann imgproc ml photo reg surface_matching video dnn fuzzy imgcodecs shape videoio highgui objdetect plot superres ts xobjdetect xphoto bgsegm bioinspired dpm face features2d line_descriptor saliency text calib3d ccalib datasets rgbd stereo tracking videostab xfeatures2d ximgproc aruco optflow phase_unwrapping sfm stitching structured_light Disabled: world contrib_world Disabled by dependency: - Unavailable: cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev java python2 python3 viz cvv hdf matlab

Non-free algorithms are enabled

Windows RT support: NO

GUI: QT: NO Win32 UI: YES OpenGL support: NO VTK support: NO

Media I/O: ZLib: build (ver 1.2.8) JPEG: build (ver 90) WEBP: build (ver 0.3.1) PNG: build (ver 1.6.24) TIFF: build (ver 42 - 4.0.2) JPEG 2000: build (ver 1.900.1) OpenEXR: build (ver 1.7.1) GDAL: NO GDCM: NO

Video I/O: Video for Windows: YES DC1394 1.x: NO DC1394 2.x: NO FFMPEG: YES (prebuilt binaries) codec: YES (ver 57.48.101) format: YES (ver 57.41.100) util: YES (ver 55.28.100) swscale: YES (ver 4.1.100) resample: NO gentoo-style: YES GStreamer: NO OpenNI: NO OpenNI PrimeSensor Modules: NO OpenNI2: NO PvAPI: NO GigEVisionSDK: NO DirectShow: YES Media Foundation: NO XIMEA: NO Intel PerC: NO

Parallel framework: pthreads

Other third-party libraries: Use IPP: NO Use IPP Async: NO Use Lapack: NO Use Eigen: YES (ver 3.3.0) Use Cuda: NO Use OpenCL: YES Use OpenVX: NO Use custom HAL: NO

OpenCL: Include path: F:/lib/opencv/3rdparty/include/opencl/1.2 Use AMDFFT: NO Use AMDBLAS: NO

Python 2: Interpreter: NO

Python 3: Interpreter: F:/Program Files/LibreOffice 5/program/python.exe (ver 3.3.5)

Python (for build): F:/Program Files/LibreOffice 5/program/python.exe

Java: ant: NO JNI: NO Java wrappers: NO Java tests: NO

Matlab: Matlab not found or implicitly disabled

Documentation: Doxygen: C:/Program Files/doxygen/bin/doxygen.exe (ver 1.8.11)

Tests and samples: Tests: YES Performance tests: YES C/C++ Examples: NO

Install path: F:/lib/opencv/mingw64/install

cvconfig.h is in: F:/lib/opencv/mingw64

Configuring done Generating done

Then I have got a problem to compile (see http://answers.opencv.org/question/114601/error-while-building-opencv_contrib-with-eigen/)

austingg commented 7 years ago

cmake search the static gflags library by default, you shoud check your gflags whether static or shared.

OtacilioNeto commented 7 years ago

Hi. my old version of gflags was shared, but I rebuild it static and glog and ceres-solver but sfm detection still no working. :(

LaurentBerger commented 7 years ago

Do you use CMake GUI? If yes compare your config to my own config: http://perso.univ-lemans.fr/~berger/Afsd56/eigen.png http://perso.univ-lemans.fr/~berger/Afsd56/lapack.png http://perso.univ-lemans.fr/~berger/Afsd56/bilan.png

May be you should update to ceres 1.12 too (not Found Ceres version: 1.11.0) there is two egein path in cmake gui all must be fill with a good path

OtacilioNeto commented 7 years ago

Until now, the difference that I can see is that you are using OpenBLAS, but my CMake interface do not shows options to choose BLAS versions, except to CAND_BLAS.

LaurentBerger commented 7 years ago

I have found a difference I have copy this file in sfm/cmake

I have got one PR for glog and gflags too but I don't think you need it

jasjuang commented 7 years ago

On Ubuntu 16.04 and ran into a similar problem. Module opencv_sfm is only able to detect glog and gflags only if it's built as a shared library. If glog and gflags are installed from apt-get sudo apt-get install libgoogle-glog-dev libgflags-dev then it works fine because the library are shared. But if I want to get the latest update and build glog and gflags from source

git clone https://github.com/google/glog/
cd glog && mkdir build && cd build
cmake ..
sudo make install

git clone https://github.com/gflags/gflags
cd glog && mkdir build && cd build
cmake ..
sudo make install

A static library is built by default and opencv_sfm is unable to detect it causing it to not be built.