Ubuntu 14.04 安装opencv3.0后,caffe编译出现connot find -lopencv_imgcodecs的解决方式:
先将Makefile.config文件中
OPENCV_VERSION :=
3 注释掉,只修改USE_OPENCV := 1
修改后的结果:
USE_OPENCV := 1
#OPENCV_VERSION := 3
在caffe根目录下,找到Makefile文件,打开文件
查找“Derive include and lib directories”一节,修改“LIBRARIES +=”的最后一行(LIBRARIES +=opencv_imgcodecs ),增加opencv_imgcodecs
opencv_core opencv_highgui opencv_imgproc opencv_imgcodecs
(此时应该变为LIBRARIES += opencv_imgcodecs opencv_core opencv_highgui opencv_imgproc opencv_imgcodecs)
保存,退出。
注意:在做前边的基础工作是将Makefile.config文件中
OPENCV_VERSION :=
3 注释掉,只修改USE_OPENCV := 1
再在caffe目录下,sudo make all -j8一下,问题解决
# Uncomment
if you're using OpenCV 3OPENCV_VERSION :=
3
# Uncomment
if you're using OpenCV 3OPENCV_VERSION :=
3