当前位置:  开发笔记 > 大数据 > 正文

Ubuntu 14.04 kylin 安装 OpenCV 2.4.9

首先安装依赖sudoapt-get-yinstalllibopencv-devsudoapt-get-yinstallbuild-essentialcheckinstallcmakepkg-configyasmsudoapt-get-yinstalllibtiff4-devlibjpeg-devlibjasper-devsudoapt-get-yinstalllibavcodec-devlibavformat-de

首先安装依赖 sudo apt-get -y install libopencv-devsudo apt-get -y install build-essential checkinstall cmake pkg-config yasmsudo apt-get -y install libtiff4-dev libjpeg-dev libjasper-devsudo apt-get -y install libavcodec-dev libavformat-de

首先安装依赖


sudo apt-get -y install libopencv-dev
sudo apt-get -y install build-essential checkinstall cmake pkg-config yasm
sudo apt-get -y install libtiff4-dev libjpeg-dev libjasper-dev
sudo apt-get -y install libavcodec-dev libavformat-dev libswscale-dev libdc1394-22-dev libxine-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev libv4l-dev
sudo apt-get -y install python-dev python-numpy
sudo apt-get -y install libtbb-dev
sudo apt-get -y install libqt4-dev libgtk2.0-dev
sudo apt-get -y install libfaac-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev libtheora-dev libvorbis-dev libxvidcore-dev
sudo apt-get -y install x264 v4l-utils ffmpeg
sudo apt-get -y install libgtk2.0-dev

sudo apt-get update

去官网下载OpenCv 2.4.9或者OpenCv3.0.0

然后解压

##重要
在 CMakelist.txt 关掉CUDA 支持 (OFF)




mkdir build
cd build
sudo cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local ..
make -j 4
sudo make install
sudo sh -c 'echo "/usr/local/lib" > /etc/ld.so.conf.d/opencv.conf'
sudo ldconfig

推荐阅读
360691894_8a5c48
这个屌丝很懒,什么也没留下!
DevBox开发工具箱 | 专业的在线开发工具网站    京公网安备 11010802040832号  |  京ICP备19059560号-6
Copyright © 1998 - 2020 DevBox.CN. All Rights Reserved devBox.cn 开发工具箱 版权所有