04_Ubuntu安装opencv2.4.10(zip)

0、安装官方说明英文

https://docs.opencv.org/2.4.10/doc/tutorials/introduction/linux_install/linux_install.html#linux-installation

 

1、下载opencv2.4.10.zip

https://opencv.org/releases.html

04_Ubuntu安装opencv2.4.10(zip)_第1张图片

 

 2、上传解压zip文件

redhat@ubuntu:~/Desktop$ sudo unzip opencv-2.4.10.zip 

  

3. 进入源码目录,创建release目录

cd opencv-2.4.10

mkdir release  

  

4、安装依赖包

依赖包说明

  • GCC 4.4.x or later
  • CMake 2.6 or higher
  • Git
  • GTK+2.x or higher, including headers (libgtk2.0-dev)
  • pkg-config
  • Python 2.6 or later and Numpy 1.5 or later with developer packages (python-dev, python-numpy)
  • ffmpeg or libav development packages: libavcodec-dev, libavformat-dev, libswscale-dev
  • [optional] libtbb2 libtbb-dev
  • [optional] libdc1394 2.x
  • [optional] libjpeg-dev, libpng-dev, libtiff-dev, libjasper-dev, libdc1394-22-dev

依赖包命令

The packages can be installed using a terminal and the following commands or by using Synaptic Manager:

[compiler] sudo apt-get install build-essential   #  后面选择的时候选择Yes
[required] sudo apt-get install cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev
[optional] sudo apt-get install python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libjasper-dev libdc1394-22-dev

  

5. 进入release目录

安装OpenCV时,所有的文件都会被放到这个release目录下

cd release

  

6. cmake编译OpenCV源码

安装所有的lib文件都会被安装到/usr/local/opencv2.4.10目录下

cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local .. 

 

7.安装

make -j4
sudo make install -j4 

 j4代表4个进程一起

 

 8、测试opencv

参考blog:https://blog.csdn.net/oyster9/article/details/77917645

 

转载于:https://www.cnblogs.com/venicidd/p/10394921.html

你可能感兴趣的:(人工智能)