标签:
1 #因为要用到人脸识别,所以用ubuntu 安装 opencv 试试,但只搞定了opencv 的安装 ,libopen249_java.so 还没有搞定,有哪位大神知道的,求笼罩哈 2 3 #安装依赖库 4 fm@ubuntu:~$ sudo apt-get install build-essential cmake git libgtk2.0-dev pkg-config python-dev python-numpy libavcodec-dev libavformat-dev libswscale-dev libdc1394 2.x libjpeg-dev libpng-dev libtiff-dev libjasper-dev 5 6 #自行下载 opencv-2.4.9.zip 7 fm@ubuntu:~$ unzip opencv-2.4.9.zip 8 fm@ubuntu:~$ cd opencv-2.4.9 9 10 fm@ubuntu:~/opencv-2.4.9$ cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local 11 12 fm@ubuntu:~/opencv-2.4.9$ make 13 fm@ubuntu:~/opencv-2.4.9$ make install 14 15 #在opencv.conf 中加入/usr/local/lib 后保存 16 fm@ubuntu:~/opencv-2.4.9$ sudo vi /etc/ld.so.conf.d/opencv.conf 17 18 fm@ubuntu:~/opencv-2.4.9$ sudo ldconfig 19 20 #加入PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig 21 export PKG_CONFIG_PATH 22 fm@ubuntu:~/opencv-2.4.9$ vi ~/.bash_profile 23 fm@ubuntu:~/opencv-2.4.9$ source ~/.bash_profile 24 25 fm@ubuntu:~/opencv-2.4.9$ cd samples/c 26 27 fm@ubuntu:~/opencv-2.4.9$ chmod +x build_all.sh 28 fm@ubuntu:~/opencv-2.4.9$ ./build_all.sh 29 fm@ubuntu:~/opencv-2.4.9$ ./facedetect --cascade="/usr/local/share/OpenCV/haarcascades/haarcascade_frontalface_alt.xml" --scale=1.5 lena.jpg
标签:
原文地址:http://www.cnblogs.com/mmdsnb/p/4490852.html