caffe_train
caffe_train copied to clipboard
Building problem libcaffe.so.1.0.0-rc3: undefined reference to `cv::applyColorMap(cv::_InputArray const&, cv::_OutputArray const&, int)'
So, I have been having a lot of problems trying to compile caffe_train, but now I am stuck with this error. And I haven't been able to find any solution online.
For what I have seen online this is a common problem when people use OpenCV 3. ... But I am using 2.7
Error:
Built target device_query
Scanning dependencies of target train_net
[ 91%] Building CXX object tools/CMakeFiles/train_net.dir/train_net.cpp.o
Linking CXX executable compute_image_mean
../lib/libcaffe.so.1.0.0-rc3: undefined reference to `cv::applyColorMap(cv::_InputArray const&, cv::_OutputArray const&, int)'
collect2: error: ld returned 1 exit status
make[2]: *** [tools/compute_image_mean] Error 1
make[1]: *** [tools/CMakeFiles/compute_image_mean.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
Linking CXX executable convert_imageset
../lib/libcaffe.so.1.0.0-rc3: undefined reference to `cv::applyColorMap(cv::_InputArray const&, cv::_OutputArray const&, int)'
collect2: error: ld returned 1 exit status
make[2]: *** [tools/convert_imageset] Error 1
make[1]: *** [tools/CMakeFiles/convert_imageset.dir/all] Error 2
Linking CXX executable test_net
[ 91%] Built target test_net
Linking CXX executable finetune_net
Linking CXX executable net_speed_benchmark
[ 91%] Built target finetune_net
[ 91%] Built target net_speed_benchmark
Linking CXX executable extract_features
Linking CXX executable train_net
[ 91%] Built target train_net
../lib/libcaffe.so.1.0.0-rc3: undefined reference to `cv::applyColorMap(cv::_InputArray const&, cv::_OutputArray const&, int)'
collect2: error: ld returned 1 exit status
make[2]: *** [tools/extract_features] Error 1
make[1]: *** [tools/CMakeFiles/extract_features.dir/all] Error 2
Linking CXX executable caffe
../lib/libcaffe.so.1.0.0-rc3: undefined reference to `cv::applyColorMap(cv::_InputArray const&, cv::_OutputArray const&, int)'
collect2: error: ld returned 1 exit status
make[2]: *** [tools/caffe] Error 1
make[1]: *** [tools/CMakeFiles/caffe.bin.dir/all] Error 2
make: *** [all] Error 2
Configuration:
ALLOW_LMDB_NOLOCK OFF
Atlas_BLAS_LIBRARY /usr/lib/libatlas.so
Atlas_CBLAS_INCLUDE_DIR /usr/include
Atlas_CBLAS_LIBRARY /usr/lib/libcblas.so
Atlas_CLAPACK_INCLUDE_DIR /usr/include/atlas
Atlas_LAPACK_LIBRARY /usr/lib/liblapack_atlas.so
BLAS Atlas
BOOST_THREAD_LIBRARY /usr/lib/x86_64-linux-gnu/libpthread.so
BUILD_SHARED_LIBS ON
BUILD_docs ON
BUILD_matlab OFF
BUILD_only_tests
BUILD_python ON
BUILD_python_layer ON
Boost_DIR Boost_DIR-NOTFOUND
Boost_FILESYSTEM_LIBRARY_DEBUG /usr/lib/x86_64-linux-gnu/libboost_filesystem.so
Boost_FILESYSTEM_LIBRARY_RELEA /usr/lib/x86_64-linux-gnu/libboost_filesystem.so
Boost_INCLUDE_DIR /usr/include
Boost_LIBRARY_DIR /usr/lib/x86_64-linux-gnu
Boost_PYTHON_LIBRARY_DEBUG /usr/lib/x86_64-linux-gnu/libboost_python.so
Boost_PYTHON_LIBRARY_RELEASE /usr/lib/x86_64-linux-gnu/libboost_python.so
Boost_SYSTEM_LIBRARY_DEBUG /usr/lib/x86_64-linux-gnu/libboost_system.so
Boost_SYSTEM_LIBRARY_RELEASE /usr/lib/x86_64-linux-gnu/libboost_system.so
Boost_THREAD_LIBRARY_DEBUG /usr/lib/x86_64-linux-gnu/libboost_thread.so
Boost_THREAD_LIBRARY_RELEASE /usr/lib/x86_64-linux-gnu/libboost_thread.so
CAFFE_TARGET_SOVERSION 1.0.0-rc3
CAFFE_TARGET_VERSION 1.0.0-rc3
CMAKE_AR /usr/bin/ar
CMAKE_BUILD_TYPE
CMAKE_COLOR_MAKEFILE ON
CMAKE_CONFIGURATION_TYPES Debug;Release
CMAKE_CXX_COMPILER /usr/bin/c++
CMAKE_CXX_FLAGS
CMAKE_CXX_FLAGS_DEBUG -g
CMAKE_CXX_FLAGS_MINSIZEREL -Os -DNDEBUG
CMAKE_CXX_FLAGS_RELEASE -O3 -DNDEBUG
CMAKE_CXX_FLAGS_RELWITHDEBINFO -O2 -g -DNDEBUG
CMAKE_C_COMPILER /usr/bin/cc
CMAKE_C_FLAGS
CMAKE_C_FLAGS_DEBUG -g
CMAKE_C_FLAGS_MINSIZEREL -Os -DNDEBUG
CMAKE_C_FLAGS_RELEASE -O3 -DNDEBUG
CMAKE_C_FLAGS_RELWITHDEBINFO -O2 -g -DNDEBUG
CMAKE_EXE_LINKER_FLAGS
CMAKE_EXE_LINKER_FLAGS_DEBUG
CMAKE_EXE_LINKER_FLAGS_MINSIZE
CMAKE_EXE_LINKER_FLAGS_RELEASE
CMAKE_EXE_LINKER_FLAGS_RELWITH
CMAKE_EXPORT_COMPILE_COMMANDS OFF
CMAKE_INSTALL_PREFIX /home/gtk/m_HDD/caffe_train/build/install
CMAKE_INSTALL_RPATH_USE_LINK_P TRUE
CMAKE_LINKER /usr/bin/ld
CMAKE_MAKE_PROGRAM /usr/bin/make
CMAKE_MODULE_LINKER_FLAGS
CMAKE_MODULE_LINKER_FLAGS_DEBU
CMAKE_MODULE_LINKER_FLAGS_MINS
CMAKE_MODULE_LINKER_FLAGS_RELE
CMAKE_MODULE_LINKER_FLAGS_RELW
CMAKE_NM /usr/bin/nm
CMAKE_OBJCOPY /usr/bin/objcopy
CMAKE_OBJDUMP /usr/bin/objdump
CMAKE_RANLIB /usr/bin/ranlib
CMAKE_SHARED_LINKER_FLAGS
CMAKE_SHARED_LINKER_FLAGS_DEBU
CMAKE_SHARED_LINKER_FLAGS_MINS
CMAKE_SHARED_LINKER_FLAGS_RELE
CMAKE_SHARED_LINKER_FLAGS_RELW
CMAKE_SKIP_INSTALL_RPATH OFF
CMAKE_SKIP_RPATH OFF
CMAKE_STATIC_LINKER_FLAGS
CMAKE_STATIC_LINKER_FLAGS_DEBU
CMAKE_STATIC_LINKER_FLAGS_MINS
CMAKE_STATIC_LINKER_FLAGS_RELE
CMAKE_STATIC_LINKER_FLAGS_RELW
CMAKE_STRIP /usr/bin/strip
CMAKE_USE_RELATIVE_PATHS OFF
CMAKE_VERBOSE_MAKEFILE OFF
CPU_ONLY OFF
CUDA_64_BIT_DEVICE_CODE ON
CUDA_ARCH_NAME Auto
CUDA_ATTACH_VS_BUILD_RULE_TO_C ON
CUDA_BUILD_CUBIN OFF
CUDA_BUILD_EMULATION OFF
CUDA_CUDART_LIBRARY /usr/local/cuda/lib64/libcudart.so
CUDA_CUDA_LIBRARY /usr/lib/x86_64-linux-gnu/libcuda.so
CUDA_GENERATED_OUTPUT_DIR
CUDA_HOST_COMPILATION_CPP ON
CUDA_HOST_COMPILER /usr/bin/cc
CUDA_NVCC_EXECUTABLE /usr/local/cuda/bin/nvcc
CUDA_NVCC_FLAGS
CUDA_NVCC_FLAGS_DEBUG
CUDA_NVCC_FLAGS_MINSIZEREL
CUDA_NVCC_FLAGS_RELEASE
CUDA_NVCC_FLAGS_RELWITHDEBINFO
CUDA_PROPAGATE_HOST_FLAGS ON
CUDA_SDK_ROOT_DIR CUDA_SDK_ROOT_DIR-NOTFOUND
CUDA_SEPARABLE_COMPILATION OFF
CUDA_TOOLKIT_INCLUDE /usr/local/cuda/include
CUDA_TOOLKIT_ROOT_DIR /usr/local/cuda
CUDA_VERBOSE_BUILD OFF
CUDA_VERSION 7.5
CUDA_cublas_LIBRARY /usr/local/cuda/lib64/libcublas.so
CUDA_cufft_LIBRARY /usr/local/cuda/lib64/libcufft.so
CUDA_cupti_LIBRARY /usr/local/cuda/extras/CUPTI/lib64/libcupti.so
CUDA_curand_LIBRARY /usr/local/cuda/lib64/libcurand.so
CUDA_cusparse_LIBRARY /usr/local/cuda/lib64/libcusparse.so
CUDA_nppc_LIBRARY /usr/local/cuda/lib64/libnppc.so
CUDA_nppi_LIBRARY /usr/local/cuda/lib64/libnppi.so
CUDA_npps_LIBRARY /usr/local/cuda/lib64/libnpps.so
CUDNN_INCLUDE /usr/local/cuda/include
CUDNN_LIBRARY /usr/local/cuda/lib64/libcudnn.so
CUDNN_ROOT
DOXYGEN_DOT_EXECUTABLE DOXYGEN_DOT_EXECUTABLE-NOTFOUND
DOXYGEN_EXECUTABLE DOXYGEN_EXECUTABLE-NOTFOUND
GFLAGS_INCLUDE_DIR /usr/include
GFLAGS_LIBRARY /usr/lib/x86_64-linux-gnu/libgflags.so
GFLAGS_ROOT_DIR
GIT_EXECUTABLE /usr/bin/git
GLOG_INCLUDE_DIR /usr/include
GLOG_LIBRARY /usr/lib/x86_64-linux-gnu/libglog.so
GLOG_ROOT_DIR
HDF5_CXX_COMPILER_EXECUTABLE /usr/bin/h5c++
HDF5_C_COMPILER_EXECUTABLE /usr/bin/h5cc
HDF5_DIFF_EXECUTABLE HDF5_DIFF_EXECUTABLE-NOTFOUND
HDF5_DIR HDF5_DIR-NOTFOUND
HDF5_Fortran_COMPILER_EXECUTAB /usr/bin/h5fc
HDF5_HL_INCLUDE_DIR /usr/include
HDF5_IS_PARALLEL OFF
HDF5_hdf5_LIBRARY_DEBUG HDF5_hdf5_LIBRARY_DEBUG-NOTFOUND
HDF5_hdf5_LIBRARY_RELEASE /usr/lib/x86_64-linux-gnu/libhdf5.so
HDF5_hdf5_hl_LIBRARY_DEBUG HDF5_hdf5_hl_LIBRARY_DEBUG-NOTFOUND
HDF5_hdf5_hl_LIBRARY_RELEASE /usr/lib/x86_64-linux-gnu/libhdf5_hl.so
LMDB_INCLUDE_DIR /usr/include
LMDB_LIBRARIES /usr/lib/x86_64-linux-gnu/liblmdb.so
LevelDB_INCLUDE /usr/include
LevelDB_LIBRARY /usr/lib/x86_64-linux-gnu/libleveldb.so
OpenCV_3RDPARTY_LIB_DIR_DBG
OpenCV_3RDPARTY_LIB_DIR_OPT
OpenCV_CONFIG_PATH /usr/share/OpenCV
OpenCV_DIR /usr/share/OpenCV
OpenCV_LIB_DIR_DBG
OpenCV_LIB_DIR_OPT
PROTOBUF_INCLUDE_DIR /usr/include
PROTOBUF_LIBRARY /usr/lib/x86_64-linux-gnu/libprotobuf.so
PROTOBUF_LIBRARY_DEBUG /usr/lib/x86_64-linux-gnu/libprotobuf.so
PROTOBUF_LITE_LIBRARY /usr/lib/x86_64-linux-gnu/libprotobuf-lite.so
PROTOBUF_LITE_LIBRARY_DEBUG /usr/lib/x86_64-linux-gnu/libprotobuf-lite.so
PROTOBUF_PROTOC_EXECUTABLE /usr/bin/protoc
PROTOBUF_PROTOC_LIBRARY PROTOBUF_PROTOC_LIBRARY-NOTFOUND
PROTOBUF_PROTOC_LIBRARY_DEBUG PROTOBUF_PROTOC_LIBRARY_DEBUG-NOTFOUND
PYTHON_EXECUTABLE /usr/bin/python2.7
PYTHON_INCLUDE_DIR /usr/include/python2.7
PYTHON_INCLUDE_DIR2 /usr/include/x86_64-linux-gnu/python2.7
PYTHON_LIBRARY /usr/lib/x86_64-linux-gnu/libpython2.7.so
PYTHON_LIBRARY_DEBUG PYTHON_LIBRARY_DEBUG-NOTFOUND
Snappy_INCLUDE_DIR /usr/include
Snappy_LIBRARIES /usr/lib/libsnappy.so
USE_CUDNN ON
USE_LEVELDB ON
USE_LMDB ON
USE_OPENCV ON
USE_PROJECT_FOLDERS OFF
python_version 2
I hope someone is able to give me some advice, thank you very much.
@salvador-blanco applyColorMap func locates in contrib module.
I have a little trouble;
In file included from /home/buyizz/ML/caffe_train/src/caffe/cpm_data_transformer.cpp:4:0:
/usr/include/opencv2/contrib/contrib.hpp:273:23: error: ‘vector’ does not name a type
Octree( const vector<Point3f>& points, int maxLevels = 10, int minPoints = 20 );
^
/usr/include/opencv2/contrib/contrib.hpp:273:29: error: expected ‘,’ or ‘...’ before ‘<’ token
Octree( const vector<Point3f>& points, int maxLevels = 10, int minPoints = 20 );
^
/usr/include/opencv2/contrib/contrib.hpp:276:39: error: ‘vector’ does not name a type
virtual void buildTree( const vector<Point3f>& points, int maxLevels = 10, int minPoints = 20 );
^
/usr/include/opencv2/contrib/contrib.hpp:276:45: error: expected ‘,’ or ‘...’ before ‘<’ token
virtual void buildTree( const vector<Point3f>& points, int maxLevels = 10, int minPoints = 20 );
^
/usr/include/opencv2/contrib/contrib.hpp:278:44: error: ‘vector’ has not been declared
vector<Point3f>& points ) const;
^
/usr/include/opencv2/contrib/contrib.hpp:278:50: error: expected ‘,’ or ‘...’ before ‘<’ token
vector<Point3f>& points ) const;
^
/usr/include/opencv2/contrib/contrib.hpp:279:15: error: ‘vector’ does not name a type
const vector<Node>& getNodes() const { return nodes; }
^
/usr/include/opencv2/contrib/contrib.hpp:282:9: error: ‘vector’ does not name a type
vector<Point3f> points;
^
/usr/include/opencv2/contrib/contrib.hpp:283:9: error: ‘vector’ does not name a type
vector<Node> nodes;
^
/usr/include/opencv2/contrib/contrib.hpp:295:22: error: ‘vector’ does not name a type
Mesh3D(const vector<Point3f>& vtx);
^
/usr/include/opencv2/contrib/contrib.hpp:295:28: error: expected ‘,’ or ‘...’ before ‘<’ token
Mesh3D(const vector<Point3f>& vtx);
^
/usr/include/opencv2/contrib/contrib.hpp:302:35: error: ‘vector’ does not name a type
void computeNormals(const vector
can you slove it?@austingg
So, I have been having a lot of problems trying to compile caffe_train, but now I am stuck with this error. And I haven't been able to find any solution online.
For what I have seen online this is a common problem when people use OpenCV 3. ... But I am using 2.7
Error:
Built target device_query Scanning dependencies of target train_net [ 91%] Building CXX object tools/CMakeFiles/train_net.dir/train_net.cpp.o Linking CXX executable compute_image_mean ../lib/libcaffe.so.1.0.0-rc3: undefined reference to `cv::applyColorMap(cv::_InputArray const&, cv::_OutputArray const&, int)' collect2: error: ld returned 1 exit status make[2]: *** [tools/compute_image_mean] Error 1 make[1]: *** [tools/CMakeFiles/compute_image_mean.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... Linking CXX executable convert_imageset ../lib/libcaffe.so.1.0.0-rc3: undefined reference to `cv::applyColorMap(cv::_InputArray const&, cv::_OutputArray const&, int)' collect2: error: ld returned 1 exit status make[2]: *** [tools/convert_imageset] Error 1 make[1]: *** [tools/CMakeFiles/convert_imageset.dir/all] Error 2 Linking CXX executable test_net [ 91%] Built target test_net Linking CXX executable finetune_net Linking CXX executable net_speed_benchmark [ 91%] Built target finetune_net [ 91%] Built target net_speed_benchmark Linking CXX executable extract_features Linking CXX executable train_net [ 91%] Built target train_net ../lib/libcaffe.so.1.0.0-rc3: undefined reference to `cv::applyColorMap(cv::_InputArray const&, cv::_OutputArray const&, int)' collect2: error: ld returned 1 exit status make[2]: *** [tools/extract_features] Error 1 make[1]: *** [tools/CMakeFiles/extract_features.dir/all] Error 2 Linking CXX executable caffe ../lib/libcaffe.so.1.0.0-rc3: undefined reference to `cv::applyColorMap(cv::_InputArray const&, cv::_OutputArray const&, int)' collect2: error: ld returned 1 exit status make[2]: *** [tools/caffe] Error 1 make[1]: *** [tools/CMakeFiles/caffe.bin.dir/all] Error 2 make: *** [all] Error 2
Configuration:
ALLOW_LMDB_NOLOCK OFF Atlas_BLAS_LIBRARY /usr/lib/libatlas.so Atlas_CBLAS_INCLUDE_DIR /usr/include Atlas_CBLAS_LIBRARY /usr/lib/libcblas.so Atlas_CLAPACK_INCLUDE_DIR /usr/include/atlas Atlas_LAPACK_LIBRARY /usr/lib/liblapack_atlas.so BLAS Atlas BOOST_THREAD_LIBRARY /usr/lib/x86_64-linux-gnu/libpthread.so BUILD_SHARED_LIBS ON BUILD_docs ON BUILD_matlab OFF BUILD_only_tests BUILD_python ON BUILD_python_layer ON Boost_DIR Boost_DIR-NOTFOUND Boost_FILESYSTEM_LIBRARY_DEBUG /usr/lib/x86_64-linux-gnu/libboost_filesystem.so Boost_FILESYSTEM_LIBRARY_RELEA /usr/lib/x86_64-linux-gnu/libboost_filesystem.so Boost_INCLUDE_DIR /usr/include Boost_LIBRARY_DIR /usr/lib/x86_64-linux-gnu Boost_PYTHON_LIBRARY_DEBUG /usr/lib/x86_64-linux-gnu/libboost_python.so Boost_PYTHON_LIBRARY_RELEASE /usr/lib/x86_64-linux-gnu/libboost_python.so Boost_SYSTEM_LIBRARY_DEBUG /usr/lib/x86_64-linux-gnu/libboost_system.so Boost_SYSTEM_LIBRARY_RELEASE /usr/lib/x86_64-linux-gnu/libboost_system.so Boost_THREAD_LIBRARY_DEBUG /usr/lib/x86_64-linux-gnu/libboost_thread.so Boost_THREAD_LIBRARY_RELEASE /usr/lib/x86_64-linux-gnu/libboost_thread.so CAFFE_TARGET_SOVERSION 1.0.0-rc3 CAFFE_TARGET_VERSION 1.0.0-rc3 CMAKE_AR /usr/bin/ar CMAKE_BUILD_TYPE CMAKE_COLOR_MAKEFILE ON CMAKE_CONFIGURATION_TYPES Debug;Release CMAKE_CXX_COMPILER /usr/bin/c++ CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG -g CMAKE_CXX_FLAGS_MINSIZEREL -Os -DNDEBUG CMAKE_CXX_FLAGS_RELEASE -O3 -DNDEBUG CMAKE_CXX_FLAGS_RELWITHDEBINFO -O2 -g -DNDEBUG CMAKE_C_COMPILER /usr/bin/cc CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG -g CMAKE_C_FLAGS_MINSIZEREL -Os -DNDEBUG CMAKE_C_FLAGS_RELEASE -O3 -DNDEBUG CMAKE_C_FLAGS_RELWITHDEBINFO -O2 -g -DNDEBUG CMAKE_EXE_LINKER_FLAGS CMAKE_EXE_LINKER_FLAGS_DEBUG CMAKE_EXE_LINKER_FLAGS_MINSIZE CMAKE_EXE_LINKER_FLAGS_RELEASE CMAKE_EXE_LINKER_FLAGS_RELWITH CMAKE_EXPORT_COMPILE_COMMANDS OFF CMAKE_INSTALL_PREFIX /home/gtk/m_HDD/caffe_train/build/install CMAKE_INSTALL_RPATH_USE_LINK_P TRUE CMAKE_LINKER /usr/bin/ld CMAKE_MAKE_PROGRAM /usr/bin/make CMAKE_MODULE_LINKER_FLAGS CMAKE_MODULE_LINKER_FLAGS_DEBU CMAKE_MODULE_LINKER_FLAGS_MINS CMAKE_MODULE_LINKER_FLAGS_RELE CMAKE_MODULE_LINKER_FLAGS_RELW CMAKE_NM /usr/bin/nm CMAKE_OBJCOPY /usr/bin/objcopy CMAKE_OBJDUMP /usr/bin/objdump CMAKE_RANLIB /usr/bin/ranlib CMAKE_SHARED_LINKER_FLAGS CMAKE_SHARED_LINKER_FLAGS_DEBU CMAKE_SHARED_LINKER_FLAGS_MINS CMAKE_SHARED_LINKER_FLAGS_RELE CMAKE_SHARED_LINKER_FLAGS_RELW CMAKE_SKIP_INSTALL_RPATH OFF CMAKE_SKIP_RPATH OFF CMAKE_STATIC_LINKER_FLAGS CMAKE_STATIC_LINKER_FLAGS_DEBU CMAKE_STATIC_LINKER_FLAGS_MINS CMAKE_STATIC_LINKER_FLAGS_RELE CMAKE_STATIC_LINKER_FLAGS_RELW CMAKE_STRIP /usr/bin/strip CMAKE_USE_RELATIVE_PATHS OFF CMAKE_VERBOSE_MAKEFILE OFF CPU_ONLY OFF CUDA_64_BIT_DEVICE_CODE ON CUDA_ARCH_NAME Auto CUDA_ATTACH_VS_BUILD_RULE_TO_C ON CUDA_BUILD_CUBIN OFF CUDA_BUILD_EMULATION OFF CUDA_CUDART_LIBRARY /usr/local/cuda/lib64/libcudart.so CUDA_CUDA_LIBRARY /usr/lib/x86_64-linux-gnu/libcuda.so CUDA_GENERATED_OUTPUT_DIR CUDA_HOST_COMPILATION_CPP ON CUDA_HOST_COMPILER /usr/bin/cc CUDA_NVCC_EXECUTABLE /usr/local/cuda/bin/nvcc CUDA_NVCC_FLAGS CUDA_NVCC_FLAGS_DEBUG CUDA_NVCC_FLAGS_MINSIZEREL CUDA_NVCC_FLAGS_RELEASE CUDA_NVCC_FLAGS_RELWITHDEBINFO CUDA_PROPAGATE_HOST_FLAGS ON CUDA_SDK_ROOT_DIR CUDA_SDK_ROOT_DIR-NOTFOUND CUDA_SEPARABLE_COMPILATION OFF CUDA_TOOLKIT_INCLUDE /usr/local/cuda/include CUDA_TOOLKIT_ROOT_DIR /usr/local/cuda CUDA_VERBOSE_BUILD OFF CUDA_VERSION 7.5 CUDA_cublas_LIBRARY /usr/local/cuda/lib64/libcublas.so CUDA_cufft_LIBRARY /usr/local/cuda/lib64/libcufft.so CUDA_cupti_LIBRARY /usr/local/cuda/extras/CUPTI/lib64/libcupti.so CUDA_curand_LIBRARY /usr/local/cuda/lib64/libcurand.so CUDA_cusparse_LIBRARY /usr/local/cuda/lib64/libcusparse.so CUDA_nppc_LIBRARY /usr/local/cuda/lib64/libnppc.so CUDA_nppi_LIBRARY /usr/local/cuda/lib64/libnppi.so CUDA_npps_LIBRARY /usr/local/cuda/lib64/libnpps.so CUDNN_INCLUDE /usr/local/cuda/include CUDNN_LIBRARY /usr/local/cuda/lib64/libcudnn.so CUDNN_ROOT DOXYGEN_DOT_EXECUTABLE DOXYGEN_DOT_EXECUTABLE-NOTFOUND DOXYGEN_EXECUTABLE DOXYGEN_EXECUTABLE-NOTFOUND GFLAGS_INCLUDE_DIR /usr/include GFLAGS_LIBRARY /usr/lib/x86_64-linux-gnu/libgflags.so GFLAGS_ROOT_DIR GIT_EXECUTABLE /usr/bin/git GLOG_INCLUDE_DIR /usr/include GLOG_LIBRARY /usr/lib/x86_64-linux-gnu/libglog.so GLOG_ROOT_DIR HDF5_CXX_COMPILER_EXECUTABLE /usr/bin/h5c++ HDF5_C_COMPILER_EXECUTABLE /usr/bin/h5cc HDF5_DIFF_EXECUTABLE HDF5_DIFF_EXECUTABLE-NOTFOUND HDF5_DIR HDF5_DIR-NOTFOUND HDF5_Fortran_COMPILER_EXECUTAB /usr/bin/h5fc HDF5_HL_INCLUDE_DIR /usr/include HDF5_IS_PARALLEL OFF HDF5_hdf5_LIBRARY_DEBUG HDF5_hdf5_LIBRARY_DEBUG-NOTFOUND HDF5_hdf5_LIBRARY_RELEASE /usr/lib/x86_64-linux-gnu/libhdf5.so HDF5_hdf5_hl_LIBRARY_DEBUG HDF5_hdf5_hl_LIBRARY_DEBUG-NOTFOUND HDF5_hdf5_hl_LIBRARY_RELEASE /usr/lib/x86_64-linux-gnu/libhdf5_hl.so LMDB_INCLUDE_DIR /usr/include LMDB_LIBRARIES /usr/lib/x86_64-linux-gnu/liblmdb.so LevelDB_INCLUDE /usr/include LevelDB_LIBRARY /usr/lib/x86_64-linux-gnu/libleveldb.so OpenCV_3RDPARTY_LIB_DIR_DBG OpenCV_3RDPARTY_LIB_DIR_OPT OpenCV_CONFIG_PATH /usr/share/OpenCV OpenCV_DIR /usr/share/OpenCV OpenCV_LIB_DIR_DBG OpenCV_LIB_DIR_OPT PROTOBUF_INCLUDE_DIR /usr/include PROTOBUF_LIBRARY /usr/lib/x86_64-linux-gnu/libprotobuf.so PROTOBUF_LIBRARY_DEBUG /usr/lib/x86_64-linux-gnu/libprotobuf.so PROTOBUF_LITE_LIBRARY /usr/lib/x86_64-linux-gnu/libprotobuf-lite.so PROTOBUF_LITE_LIBRARY_DEBUG /usr/lib/x86_64-linux-gnu/libprotobuf-lite.so PROTOBUF_PROTOC_EXECUTABLE /usr/bin/protoc PROTOBUF_PROTOC_LIBRARY PROTOBUF_PROTOC_LIBRARY-NOTFOUND PROTOBUF_PROTOC_LIBRARY_DEBUG PROTOBUF_PROTOC_LIBRARY_DEBUG-NOTFOUND PYTHON_EXECUTABLE /usr/bin/python2.7 PYTHON_INCLUDE_DIR /usr/include/python2.7 PYTHON_INCLUDE_DIR2 /usr/include/x86_64-linux-gnu/python2.7 PYTHON_LIBRARY /usr/lib/x86_64-linux-gnu/libpython2.7.so PYTHON_LIBRARY_DEBUG PYTHON_LIBRARY_DEBUG-NOTFOUND Snappy_INCLUDE_DIR /usr/include Snappy_LIBRARIES /usr/lib/libsnappy.so USE_CUDNN ON USE_LEVELDB ON USE_LMDB ON USE_OPENCV ON USE_PROJECT_FOLDERS OFF python_version 2
I hope someone is able to give me some advice, thank you very much. i have same question with you , this is the solution: modify caffe_root/cmake/Dependencies.cmake add contrib:
---[ OpenCV
if(USE_OPENCV) find_package(OpenCV QUIET COMPONENTS core highgui imgproc imgcodecs contrib)