http://milq.github.io/install-OpenCV-ubuntu-debian/
转注:就用第一个方法吧,第二个方法的那个sh文件执行失败,因为我价格kurento.org的源,在安装第一个时,用到了这个源几个包。

Install opencv on Ubuntu or Debian is a bit long but very easy. You can install OpenCV from the Ubuntu or Debian repository or from the official site.

OPTION 1: INSTALL OPENCV FROM THE UBUNTU OR DEBIAN REPOSITORY

You can install OpenCV from the Ubuntu or Debian repository:

sudo apt-get install libopencv-dev python-opencv

However, you will probably not have installed the latest version of OpenCV and you may miss some features (for example: Python 3 bindings do not exist in the repository).

OPTION 2: INSTALL OPENCV FROM THE OFFICIAL SITE

To install the latest version of OpenCV be sure that you have removed the library from the repository with sudo apt-get autoremove libopencv-dev python-opencvand follow the steps below.

2.1. RUN AN INSTALLATION SCRIPT

The most simple and elegant way to install a library is running an installation script.

Download the installation script install-opencv.sh, open your terminal and execute:

bash install-opencv.sh

Type your sudo password and you will have installed OpenCV. This operation may take a long time due to the packages to be installed and the compilation process.

This script has been tested on Ubuntu 14.04 LTS, Ubuntu 16.04 LTS and Debian 8.0 "Jessie", with OpenCV 3.0.0 and OpenCV 3.1.0. You can freely change this script as you like or adapt it to other OS or OpenCV version.

2.2. EXECUTE SOME OPENCV EXAMPLES

Go to your OpenCV directory and execute a C++ example:

cd build/bin
./cpp-example-edge ../../samples/data/fruits.jpg

Now, go to your OpenCV directory and execute a Python example:

cd samples/python
python3 video.py

Finally, go to your OpenCV directory and execute a Java example:

cd samples/java/ant
ant -DocvJarDir=../../../build/bin -DocvLibDir=../../../build/lib

2.3. COMPILE A DEMONSTRATION

Download the files demo.cpp and CMakeLists.txt and put them into a folder. Now, open your terminal, go to the folder and execute:

mkdir build && cd build && cmake .. && make

Finally, run the demo: ./demo.

And that's it! You have installed OpenCV, run some examples, and compiled OpenCV code!

Install OpenCV on Ubuntu or Debian的更多相关文章

  1. anaconda2下面安装opencv2.4.13.4完成----解决默认安装的问题----Thefunction is not implemented. Rebuild the library with Windows, GTK+ 2.x orCarbon support. If you are on Ubuntu or Debian, install libgtk2.0‑dev and pkg

    转载自:http://blog.csdn.net/qingyanyichen/article/details/73550924 本人下载编译安装了opencv2.4.9,oppencv2.4.10,o ...

  2. Install OpenCV 3.0 and Python 2.7+ on Ubuntu

    为了防止原文消失或者被墙,转载留个底,最好还是去看原贴,因为随着版本变化,原贴是有人维护升级的 http://www.pyimagesearch.com/2015/06/22/install-Open ...

  3. 【opencv】ubuntu opencv imshow()报错

    错误提示: ubuntu opencv imshow() 报错 windows.cpp报错 the function is not implemented If you are on Ubuntu o ...

  4. Install Docker on Ubuntu

    Install Docker on Ubuntu Estimated reading time: 17 minutes Docker is supported on these Ubuntu oper ...

  5. 【转载】ubuntu和debian环境下无法挂载vmware虚拟机共享目录的解决办法

    转载自:http://www.fengfly.com/plus/view-210022-1.html 第一步,安装VMware Tools 打开虚拟机ubuntu(debian原理一样)后,首先,点击 ...

  6. Opencv on Ubuntu (from Ubuntu)

     OpenCV Introduction Contents Introduction Installation Step 1 Step 2 Running OpenCV Python in C I ...

  7. Install OpenCV 3.0 and Python 2.7+ on OSX

    http://www.pyimagesearch.com/2015/06/15/install-OpenCV-3-0-and-Python-2-7-on-osx/ As I mentioned las ...

  8. [OpenCV] Install OpenCV 3.3 with DNN

    OpenCV 3.3 Aug 3, 2017 OpenCV 3.3 has been released with greatly improved Deep Learning module and l ...

  9. [OpenCV] Install OpenCV 3.4 with DNN

    目标定位 一.开始全面支持 Tensorflow OpenCV3.4 新功能 当前最新进展OpenCV 3.4 dev:https://github.com/opencv/opencv/tree/ma ...

随机推荐

  1. 【翻译】在Ext JS 6通用应用程序中使用既共享又特定于视图的代码

    原文:Using Both Shared and View-Specific Code in an Ext JS 6 Universal App 在本文,在展示如何编写Ext JS 6通用应用程序代码 ...

  2. Spark-streaming 连接flume

    1,程序为spark的example中的FlumeEventCount示例 object FlumeEventCount { def main(args: Array[String]) { Strea ...

  3. 四大组件之Service小结

    总结提高,与君共勉! 1.Service是什么 Service 是看不到界面的,,就是一个没有界面的Activity, 并且长期在后台运行的一个组件.. 由于ANR对Activity和Broadcas ...

  4. C++ Primer 有感(面向对象编程)

    1.除了构造函数之外,任意非static成员函数都可以是虚函数.保留字virtual只在类内部的成员函数声明处出现,不能用在类定义体外部出现的函数定义上. 2.派生类只能通过派生类对象访问其基类的pr ...

  5. Android万能适配器Adapter-android学习之旅(74)

    万能适配器的代码的github地址是https://github.com/fengsehng/CommonAdapter 万能适配器的代码的github地址是https://github.com/fe ...

  6. equals()与hashCode()方法协作约定

    翻译人员: 铁锚 翻译时间: 2013年11月15日 原文链接: Java equals() and hashCode() Contract 图1 Java所有对象的超类 java.lang.Obje ...

  7. 多态 OC——第十天

    1.多态  父类指针指向子类对象      没有继承就没有多态      联系前面知识才能清楚什么是多态,所以放到最后面总结小知识点,有前面的知识会对多态更好的了解,会觉得简单很多,但是看此篇博文需要 ...

  8. UVa - 1618 - Weak Key

    Cheolsoo is a cryptographer in ICPC(International Cryptographic Program Company). Recently, Cheolsoo ...

  9. CentOS安装并设置MariaDB

    作者: 铁锚 日期: 2013年12月27日 部分参考: Centos 使用YUM安装MariaDB 说明: 首先必须能链接外网. 如果不能直接访问,那也可以设置代理,请参考: 在内网机器上设置yum ...

  10. 关于post利用之Python

    今天大师兄放出了自己用PHP写的KTV点歌系统,注明,欢迎调戏,于是乎就尝试了下. 地址就不上了,到现在没补漏洞,我可不想被大师兄K…… 首先试试JavaScript脚本能否恶搞下 来个最基础的警告框 ...