文档章节

Install Opencv in CentOS

Mark93
 Mark93
发布于 2017/02/15 14:41
字数 344
阅读 31
收藏 0

Install opencv in CentOS
Opencv can be install in CentOS in two ways:

1) Install from available yum repository.
But till the time of writing this post opencv-2.0.0 repository are available. If you need latest version of opencv then go for 2. option.
2) Opencv installation from source.

1) Install opencv from yum repo
Before installation of opencv-python from yum repository we have to install require library numpy.

$ sudo yum install python-devel python-nose python-setuptools gcc gcc-gfortran gcc-c++ blas-devel lapack-devel atlas-devel
$ sudo easy_install pip
$ sudo pip install numpy==1.6.1

If you haven’t installed opencv rpm then you can download from here and install it first . After installation of rpm now opencv will be available for installation.

$ yum install opencv

2) Installing Opencv from Source:
To install opencv from we need to install require and optional dependencies.

  • CMake : For configure the opencv installation.
  • Python-devel and Numpy : For Creating python extension.
  • GCC: For compilation.
$ yum install cmake
$ yum install python-devel numpy
$ yum install gcc gcc-c++

Install GTK To support GUI features, Camera support (libdc1394, libv4l), Media Support (ffmpeg, gstreamer) etc.

$ yum install gtk2-devel
$ yum install libdc1394-devel
$ yum install libv4l-devel
$ yum install ffmpeg-devel
$ yum install gstreamer-plugins-base-devel

Optional Dependencies:
Install below pakcages if you need latest libraries of PNG, JPEG, JPEG2000, TIFF, WebP.

$ yum install libpng-devel libjpeg-turbo-devel jasper-devel openexr-devel libtiff-devel libwebp-devel

Now we have finish the first step of opencv installation. In next step download the opencv source from git repository.

$ yum install git
$ mkdir opencv-build
$ cd opencv-build
$ git clone https://github.com/Itseez/opencv.git
$ cd opencv
$ git checkout tags/2.4.8.2

Create a new directory build to compile opencv from source.

$ mkdir build
$ cd build
$ cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local ..
$ make
$ sudo make install

Above installation will install package in /usr/local/lib . To use this we need to copy site-packages from /usr/local/lib to /usr/lib.
Move opencv module from in defult python path:

$ cp /usr/local/lib/python2.7/site-packages/cv2.so /usr/lib/python2.7/site-packages

Verify Installation:

$ python
>>> import cv2
>>> print cv2.__version__

That’s it.

本文转载自:http://techieroop.com/install-opencv-in-centos/

共有 人打赏支持
Mark93
粉丝 6
博文 140
码字总数 35695
作品 0
朝阳
私信 提问
Linux 中使用 OpenCV

修订记录 2012.11.20修订OpenCV 2.4+在CentOS安装方法。 2012.11.21添加OpenCV 2的打开图片的写法。 预备 GCC CMake OpenCV 这些都可以在CentOS 6.0的“添加/删除软件”里面找到并安装。其他...

j_m
2012/11/26
0
0
OpenCV学习笔记(09):opencv3.2+cmake3.8+VS2013,编译opencv_contrib

版权声明:假装这里有个版权声明…… https://blog.csdn.net/CV_Jason/article/details/70037545 Cmake编译opencv contrib部分 1. 前言 最近才知道,在OpenCV3.0 之后,OpenCV算法包被拆分成...

CodeLike
2017/04/10
0
0
Windows10上使用VS2017编译OpenCV3.4.2+OpenCV_Contrib3.4.2+Python3.6.2操作步骤

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/fengbingchun/article/details/84030309 1. 从https://github.com/opencv/opencv/releases 下载opencv-3.4.2.......

fengbingchun
2018/11/13
0
0
在iPhone上使用 OpenCV

2012-08-02 01:08   原文:http://niw.at/articles/2009/03/14/using-opencv-on-iphone/en   Posted by Yoshimasa Niwaon 03/14, 2009   图片   OpenCV是intel开发的计算机视觉库,例......

abcMx
2013/09/05
0
0
OpenCV配置,从来没有这么简单!

用CMAKE配置自己的OpenCV程序 ---配置OpenCV从来没有这么简单! 本文需要一定的CMAKE知识,推荐阅读中文的 CMake Practice.pdf ,至于Cmake是什么,我只能说他是跨平台的项目管理工具,具体请各位...

LMcallme
2015/04/26
0
6

没有更多内容

加载失败,请刷新页面

加载更多

全面理解Java内存模型(JMM)及volatile关键字

理解Java内存区域与Java内存模型 Java内存区域 Java虚拟机在运行程序时会把其自动管理的内存划分为以上几个区域,每个区域都有的用途以及创建销毁的时机,其中蓝色部分代表的是所有线程共享的...

亭子happy
29分钟前
1
0
Prometheus监控mysql实例--centos7安装mysql_exporter

目录 概述 环境准备 普罗米修斯简介 mysql安装 mysqld_exporter安装 启动参数列表 概述 prometheus(普罗米修斯) 是一个开源系统监控和报警工具包,许多公司和组织都采用了Prometheus,该项目...

java_龙
34分钟前
5
0
拥有2000家门店,他如何晋升为服装界的新宠?

摘要: —— iwarm3.0加热组件、碳纳米管膜炎、管状石墨结构体...你看到并不是一款高科技电子产品,这是快鱼服饰在这个冬天推出的黑科技产品 - 智能温控羽绒服。 在竞争激烈的服装行业,快鱼...

阿里云云栖社区
36分钟前
2
0
不忘初心 砥砺前行-智和信通2018年年会报道

1月18日,智和信通以“不忘初心 砥砺前行”为主题的2018总结会议暨2019年年会在京召开。年会以总经理李少龙的讲话为开场,充分肯定了全体员工2018年的工作和成绩,并表达了公司产品智和网管平...

智和网管平台
45分钟前
1
0
NGINX api网关

nginx配置 vi nginx.conf include /usr/local/nginx/conf/api/gateway.conf; # 所有的API网关配置 include /usr/local/nginx/conf/vhosts/*.conf; # 正常web域名配置......

以谁为师
46分钟前
2
0

没有更多内容

加载失败,请刷新页面

加载更多

返回顶部
顶部