报错:
执行opencv文件时
./facedetect--cascade="../../data/haarcascades/haarcascade_frontalface_alt.xml"--nested-cascade="../../data/haarcascades/haarcascade_eye.xml"--scale=1.3 lena.jpg
./facedetect: error while loading shared libraries:libopencv_nonfree.so.2.4: cannot open shared object file: No suchfile or directory
解决:
找到libopencv开头的库目录,通常在/usr/local/lib
在/etc/ld.so.conf.d/下面新建一个opencv.conf,写入/usr/local/lib
执行sudo ldconfig -v
执行opencv文件时
./facedetect--cascade="../../data/haarcascades/haarcascade_frontalface_alt.xml"--nested-cascade="../../data/haarcascades/haarcascade_eye.xml"--scale=1.3 lena.jpg
./facedetect: error while loading shared libraries:libopencv_nonfree.so.2.4: cannot open shared object file: No suchfile or directory
解决:
找到libopencv开头的库目录,通常在/usr/local/lib
在/etc/ld.so.conf.d/下面新建一个opencv.conf,写入/usr/local/lib
执行sudo ldconfig -v
本文介绍了在使用OpenCV进行面部检测时遇到的共享库加载失败的问题,并提供了解决方案。通过配置系统路径并更新共享库缓存,可以成功加载所需的OpenCV库。

5168

被折叠的 条评论
为什么被折叠?



