安装opencv3.3.0方法

#系统环境:CentOS6.5 x64

#首先安装jdk7u80

mkdir  /java

tar -zxvf  jdk-7u80-linux-x64.gz  -C  /java/

vim  /etc/profile

#添加以下变量,并用export宣告给所有子shell。

JAVA_HOME=/java/jdk1.7.0_80/

JAVA_BIN=/java/jdk1.7.0_80/bin

PATH=$PATH:$JAVA_HOME/bin

export JAVA_HOME JAVA_BIN PATH

export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar

:wq

source /etc/profile

# 如果存在openjdk,删除openjdk

rpm -e openjdk  --nodeps

#验证新装jdk版本

java -version

#安装python3.6

./configure --prefix=/usr/local/python

make && make install

#更改默认python的bin文件名

mv /usr/bin/python /usr/bin/python2.6.6

ln -sv /usr/local/python/bin/python3.6 /usr/local/python/bin/python

echo "export PATH=/usr/local/python/bin/:$PATH" >> /etc/profile

source  /etc/profile

vim  /usr/bin/yum

#!/usr/bin/python2.6.6

:wq

注意:python版本可根据实际情况去调整,如果是opencv2.4.10,那么就需要python2.7。

#安装cmake

官网:https://cmake.org/

#cd /usr/local/src

#wget https://cmake.org/files/v3.5/cmake-3.5.0.tar.gz

#tar -zxvf cmake-3.5.0.tar.gz

# cd cmake-3.5.0

#./configure

#gmake && make install

#安装opencv3.3

#也可以到github上面找到opencv项目然后选择“master”,选择3.3版本,点击右边的“download zip”下载源码的压缩包

#安装依赖包

yum  install   ant    gcc  gtk2-devel   pkgconfig  zlib-devel

//因官网提供的安装方法基于ubuntu,上面提供的有的依赖包在centos上并没有找到。

yum   groupinstall "Development Tools"

#解压到家目录下

cd ~/opencv
mkdir build
cd build

cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/home/zxqz/opencv -DBUILD_TESTS=OFF  ..

make

make install

vim /etc/profile

#opencv3.3.0#

OPENCV_HOME=/home/zxqz/opencv

OPENCV_BIN=/home/zxqz/opencv/bin

export PATH=$OPENCV_HOME/bin:$PATH

#opencv3.3.0#

:wq

source /etc/profile

#安装后验证方法

安装成功后,会在build/bin目录下生成一个opencv-330.jar文件,另外会在build/lib目录下生成一个libopencv_java330.so文件,330是因为我安装的openvc版本是3.3.0。

时间: 2024-09-30 06:39:05

安装opencv3.3.0方法的相关文章

ubuntu16.04 安装opencv3.2.0

2.2 安装opencv3.2.0 2.2.1 安装opencv依赖库 在终端输入以下命令,进行安装opencv依赖库: 1. sudo apt-get install build-essential 2. sudo apt-get install cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev 3. sudo apt-get install python-dev python-nu

vs2015安装+OpenCV3.2.0配置

因开发和学习的需要,要把程序转为vs2015+OpenCV3.2.0这两个最新的平台上. 安装包:vs2015专业版iso镜像(百度云有):opencv-3.2.0-vc14.exe文件(opencv官网下载) 1.vs2015的安装: 安装并注册激活即可. 产品密钥 专业版:HMGNV-WCYXV-X7G9W-YCX63-B98R2 企业版:HM6NR-QXX7C-DFW2Y-8B82K-WTYJV 2.opencv安装与配置: (1)双击opencv-3.2.0-vc14.exe文件,选择合

[环境配置]Ubuntu 16.04 源码编译安装OpenCV-3.2.0+OpenCV_contrib-3.2.0及产生的问题

1.OpenCV-3.2.0+OpenCV_contrib-3.2.0编译安装过程 1)下载官方要求的依赖包 GCC 4.4.x or later CMake 2.6 or higher Git GTK+2.x or higher, including headers (libgtk2.0-dev) # 控制opencv GUI pkg-config Python 2.6 or later and Numpy 1.5 or later with developer packages (pytho

Ubuntu16.04下安装OpenCV3.2.0

1.安装官方给的opencv依赖包 $ sudo apt-get install build-essential $ sudo apt-get install cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev $ sudo apt-get install python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev

ubuntu安装opencv3.1.0

配置环境: sudo apt-get install build-essential sudo apt-get install cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev sudo apt-get install python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libjas

OSX下编译安装opencv3.1.0与opencv_contrib_master

OSX版本10.11.3 1.安装homebrew,打开终端,写入指令 ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)” 2.安装完成以后,终端输入 brew help,出现界面如下说明安装完成 3.安装wget,doxygen工具,为了能够生成最终技术文档 brew install wget brew install doxygen 4.下载cmakegui工具,下

ubuntu16.04安装opencv3.1.0+Qt5.6.0

安装依赖的库 sudo apt-get install build-essential // 必须的,gcc编译环境 sudo apt-get install cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev // 必须的,包括cmake等工具 sudo apt-get install python-dev python-numpy libtbb2 libtbb-dev libjpeg

ubuntu16.04下安装opencv3.1.0

1.安装依赖项 sudo apt-get install build-essential cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev 可选的 sudo apt-get install checkinstall yasm libtiff5-dev libjpeg-dev libjasper-dev libdc1394-22-dev libxine2-dev libgstreamer

【深度学习】ubuntu16.04下安装opencv3.4.0

1.首先安装一些编译工具 # 安装编译工具 sudo apt-get install build-essential # 安装依赖包 sudo apt-get install cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev # 安装可选包 sudo apt-get install python-dev python-numpy libtbb2 libtbb-dev libjpeg-d