Download opencv

https://github.com/opencv/opencv/tree/2.4

安装必要的依赖

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 libjasper-dev libdc1394-22-dev

Enter opencv dirctory and install

cd  XXXX/opencv2.4
mkdir Release
cd Release
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_TBB=ON -D BUILD_NEW_PYTHON_SUPPORT=ON -D WITH_V4L=ON -D INSTALL_C_EXAMPLES=ON -D INSTALL_PYTHON_EXAMPLES=ON -D BUILD_EXAMPLES=ON -D WITH_QT=ON -D WITH_GTK=ON -D WITH_OPENGL=ON ..

cmake 出错,报错如下

CMake Warning at cmake/OpenCVFindLibsGUI.cmake:18 (find_package):
By not providing "FindQt5Core.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Qt5Core", but
CMake did not find one. Could not find a package configuration file provided by "Qt5Core" with any
of the following names: Qt5CoreConfig.cmake
qt5core-config.cmake Add the installation prefix of "Qt5Core" to CMAKE_PREFIX_PATH or set
"Qt5Core_DIR" to a directory containing one of the above files. If
"Qt5Core" provides a separate development package or SDK, be sure it has
been installed.
Call Stack (most recent call first):
CMakeLists.txt:489 (include) CMake Warning at cmake/OpenCVFindLibsGUI.cmake:19 (find_package):
By not providing "FindQt5Gui.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Qt5Gui", but
CMake did not find one. Could not find a package configuration file provided by "Qt5Gui" with any
of the following names: Qt5GuiConfig.cmake
qt5gui-config.cmake Add the installation prefix of "Qt5Gui" to CMAKE_PREFIX_PATH or set
"Qt5Gui_DIR" to a directory containing one of the above files. If "Qt5Gui"
provides a separate development package or SDK, be sure it has been
installed.
Call Stack (most recent call first):
CMakeLists.txt:489 (include) CMake Warning at cmake/OpenCVFindLibsGUI.cmake:20 (find_package):
By not providing "FindQt5Widgets.cmake" in CMAKE_MODULE_PATH this project
has asked CMake to find a package configuration file provided by
"Qt5Widgets", but CMake did not find one. Could not find a package configuration file provided by "Qt5Widgets" with
any of the following names: Qt5WidgetsConfig.cmake
qt5widgets-config.cmake Add the installation prefix of "Qt5Widgets" to CMAKE_PREFIX_PATH or set
"Qt5Widgets_DIR" to a directory containing one of the above files. If
"Qt5Widgets" provides a separate development package or SDK, be sure it has
been installed.
Call Stack (most recent call first):
CMakeLists.txt:489 (include) CMake Warning at cmake/OpenCVFindLibsGUI.cmake:21 (find_package):
By not providing "FindQt5Test.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Qt5Test", but
CMake did not find one. Could not find a package configuration file provided by "Qt5Test" with any
of the following names: Qt5TestConfig.cmake
qt5test-config.cmake Add the installation prefix of "Qt5Test" to CMAKE_PREFIX_PATH or set
"Qt5Test_DIR" to a directory containing one of the above files. If
"Qt5Test" provides a separate development package or SDK, be sure it has
been installed.
Call Stack (most recent call first):
CMakeLists.txt:489 (include) CMake Warning at cmake/OpenCVFindLibsGUI.cmake:22 (find_package):
By not providing "FindQt5Concurrent.cmake" in CMAKE_MODULE_PATH this
project has asked CMake to find a package configuration file provided by
"Qt5Concurrent", but CMake did not find one. Could not find a package configuration file provided by "Qt5Concurrent"
with any of the following names: Qt5ConcurrentConfig.cmake
qt5concurrent-config.cmake Add the installation prefix of "Qt5Concurrent" to CMAKE_PREFIX_PATH or set
"Qt5Concurrent_DIR" to a directory containing one of the above files. If
"Qt5Concurrent" provides a separate development package or SDK, be sure it
has been installed.
Call Stack (most recent call first):
CMakeLists.txt:489 (include) qmake: could not exec '/usr/lib/x86_64-linux-gnu/qt4/bin/qmake': No such file or directory
CMake Error at /usr/share/cmake-3.5/Modules/FindQt4.cmake:1326 (message):
Found unsuitable Qt version "" from NOTFOUND, this code requires Qt 4.x
Call Stack (most recent call first):
cmake/OpenCVFindLibsGUI.cmake:34 (find_package)
CMakeLists.txt:489 (include) -- Configuring incomplete, errors occurred!
See also "/home/feng/Documents/opencv-2.4/Release/CMakeFiles/CMakeOutput.log".
See also "/home/feng/Documents/opencv-2.4/Release/CMakeFiles/CMakeError.log".

根据报错信息,应该是qt没装

安装qt

sudo apt-get install libqt4-dev

cmake成功会生成如下文件

feng@mint ~/Documents/opencv-2.4/Release $ ls
3rdparty CMakeCache.txt cmake_uninstall.cmake CPackSourceConfig.cmake data junk modules OpenCVConfig-version.cmake unix-install
apps CMakeFiles CMakeVars.txt CTestTestfile.cmake doc lib opencv2 OpenCVModules.cmake version_string.tmp
bin cmake_install.cmake CPackConfig.cmake cvconfig.h include Makefile OpenCVConfig.cmake samples
make
sudo make install

the whole installation tutorial

http://docs.opencv.org/trunk/d7/d9f/tutorial_linux_install.html

参考博客:

http://www.linuxidc.com/Linux/2016-07/132879.htm

linux mint 安装 opencv2.4的更多相关文章

  1. Linux Mint安装jdk8

    想到研究Java,可能学习openjdk是比较好的方式,于是去找openjdk.对于Debian based系统的安装指南是: -jdk 然而我的Linux Mint 17却无法安装.搜索之后发现如下 ...

  2. Linux Mint安装Docker踩坑指南

    我家的服务器选用的Linux Mint系统,最近安装Docker的时候踩了一些小坑,但是总体还算顺利. 我们都知道Linux Mint系统是基于Ubuntu的,说实话用起来感觉还是很不错的,安装Doc ...

  3. Linux mint 安装踩坑记录

    记得之前电脑上的那个Ubuntu是去年寒假的时候安装的,算下来自己用Linux也快一年了.虽然在去年暑假的时候我也曾经想过要把Ubuntu升级到18.04可是当时安装了几次都没有成功,自己也就放弃了. ...

  4. linux mint 安装xshell

    之前在Windows上进行开发的时候,SSH重度依赖SecureCRT或者XShell工具,现在把办公环境迁移到Linux后,每次连接都需要输入密码,尤其是需要跳板机的时候,需要逐级输入,十分麻烦.所 ...

  5. linux mint 安装微信2

    很多小伙伴都用ubuntu或者Linux Mint,但由于已经习惯了让人成瘾的国产软件,比如迅雷,qq,微信等,其实我们应该培养更为健康的上网习惯,这些软件不是非用不可,但如果你不用不行, 那么也是有 ...

  6. linux mint安装mysql-8.0.16

    1.使用通用二进制文件在Unix / Linux上安装MySQL 下载的文件:mysql-8.0.16-linux-glibc2.12-x86_64.tar.xz 注意: 如果您以前使用操作系统本机程 ...

  7. 使用linux mint 安装无线网卡驱动

    新买了个笔记本Thinkpad E440,用了两天发现无线网非常不稳定,有时候能搜到wifi却连不上,有时候连上了却连不上互联网,于是决定重新安装个网卡驱动. 首先看看自己显卡的型号: lspci : ...

  8. linux mint 安装微信

    安装nodejs 到nodejs官网下载node js压缩包,然后解压到自己设置的目录.我的解压路径是 /home/congwiny/Develop/SoftWare/node-v6.10.3-lin ...

  9. linux下安装OpenCV-2.4

    OpenCV(Open Source Computer Vision Library),是一个跨平台计算机视觉库,实现了图像处理和计算机视觉方面的很多通用算法. OpenCV由一系列 C 函数和少量 ...

随机推荐

  1. 使用Tenorshare iCareFone for mac为iPhone做系统修复

    tenorshare icarefonemac中文版采用一键式方法来保护,修理,清洁,优化并最终加快您的iPhone,iPad和iPod的速度.它可以帮助您轻松解决所有iOS问题,并让您的iPhone ...

  2. UI设计之动画—从虚拟到现实

    以下内容由摹客团队翻译整理,仅供学习交流,摹客iDoc是支持智能标注和切图的产品协作设计神器. 用户界面设计中的动画一直是这几年热议的话题,尤其活跃在概念动画领域.它为设计师提供创造性实验并推动UI动 ...

  3. oracle service name sid , 用户 和 表空间

    oracle 的四个概念: 数据库: 就是一堆静态的数据文件.注意是静态的 instance 实例: 可以类比数据库连接. 实例就是为了操作数据库而开辟的进程和内存空间,有了这个实例你才能操作数据库. ...

  4. HttpWebRequest请求Https协议的WebApi

    public static class RequestClient { /// <summary> /// 参数列表转为string /// </summary> /// &l ...

  5. mac mysql5.7.17修改root初始密码(知道初始密码)

    最近在mac上装个mysql可以说是麻烦死了,在这里就说说修改初始密码吧! 刚开始的时候不知道怎么修改,于是上网百度,网上几乎都是说要先执行命令mysqld_safe --skip-grant-tab ...

  6. (PMP)第5章-----项目范围管理

    产品范围:所具有的特征和功能 项目范围:必须完成的工作. 5.1 规划范围管理 输入 工具与技术 输出 1.项目章程 2.项目管理计划 (质量管理计划, 项目生命周期描述, 开发方法) 3.事业环境因 ...

  7. HTTP协议 与 TCP协议 的区别

    TCP协议是传输层协议,主要解决数据如何在网络中传输,而HTTP是应用层协议,主要解决如何包装数据. TCP/IP和HTTP协议的关系,从本质上来说,二者没有可比性,我们在传输数据时,可以只使用(传输 ...

  8. 添加sqljdbc的maven依赖JAVA环境配置

    sqljdbc是微软sql server的jdbc驱动 使用sqljdbc需要从微软的官方网站下载jar包: http://www.microsoft.com/en-us/download/detai ...

  9. vue.js 2.0(2)

    1.双向绑定v-model要写在输入框里 2.点击改变颜色:当index和isActive统一时,才会调用class html:        function:  css:        3.在同一 ...

  10. sflow介绍与安装过程

    介绍: sFlow技术是一种以设备端口为基本单元的数据流随机采样的流量监控技术,不仅可以提供完整的第二层到第四层甚至全网范围内的实时流量信息,而且可以适应超大网络流量(如大于10Gbit/s)环境下的 ...