caffe安装 opencv2.4

问题: undefined reference to `cv::applyColorMap(cv::_InputArray const&, cv::_OutputArray const&, int)’

解决方案: 
修改 caffe_root/cmake/Dependencies.cmake,添加 contrib:

# ---[ OpenCV
if(USE_OPENCV)
  find_package(OpenCV QUIET COMPONENTS core highgui imgproc imgcodecs contrib)
  if(NOT OpenCV_FOUND) # if not OpenCV 3.x, then imgcodecs are not found
    find_package(OpenCV REQUIRED COMPONENTS core highgui imgproc)
  endif()

 

你可能感兴趣的:(caffe安装 opencv2.4)