linux mint 安裝 opencv2.4

来源:http://www.cnblogs.com/0x12345678/archive/2017/05/07/6504638.html
-Advertisement-
Play Games

Download opencv https://github.com/opencv/opencv/tree/2.4 安裝必要的依賴 Enter opencv dirctory and install cmake 出錯,報錯如下 根據報錯信息,應該是qt沒裝 安裝qt cmake成功會生成如下文件 t ...


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


您的分享是我們最大的動力!

-Advertisement-
Play Games
更多相關文章
  • 整體結構 首先創建一個名為employee的資料庫 create database employee; 然後在該資料庫下建一張表 然後就是項目和資料庫進行聯繫,然後操作資料庫(增刪改查) 如果看了上一個項目大家應該被每次操作都要重新連接資料庫而煩惱,而且代碼具有高度的重覆性,那麼我們把相同的代碼封裝 ...
  • 如何讓一個表的時間欄位,隨著用戶對該行操作修改時自動更新 顯示表的所有欄位 數值列類型取值範圍及占用位元組 字元串列類型最大尺寸及占用位元組 時間列類型取值範圍及占用位元組 ...
  • Cygwin Unable to get setup from * 錯誤 解決方案 是因為用自定義鏡像站點,比如 http://mirrors.xdlinux.info/cygwin/x86_64/ 安裝x86_64位Cygwin時,因為多加了/導致Cygwin安裝程式找不到steup 換成如下即可 ...
  • shell的性質 Linux系統的shell相當於操作系統的“一層外殼”,它是命令語言解釋器,它為用戶提供了使用操作系統的介面。它不屬於內核,而是在內核之外以用戶態方式運行。它的基本功能是解釋並執行用戶打入的各種命令,實現用戶與Linux內核的介面。 個人理解:shell就是普通的用戶態程式,能夠理 ...
  • 前言:學習通配符有點為正則表達式打基礎的感覺……之前學python有學過正則表達式,所以這篇博客學起來還是挺快的。 特殊符號 通配符 他是shell的內置功能通配符,用過DOS的應該很瞭解,也很常用。通配符,指包含這些字元的字元串“?”,“*”,“[]”,{} 通配符含義 >匹配文件名 通配符詳解 ...
  • 不同的軟體的安裝方法是並不相同的。有的軟體只能通過特定的方法來安裝。 在不同的Linux發行版本上安裝同一個軟體的方法也未必相同, 因此有的時候,你在網上找到的在Ubuntu上安裝某個軟體的方法,也許在CentOS上並不能成功。 RPM、YUM、dpkg、apt-get、aptitude ...
  • Linux GSO邏輯分析 ——lvyilong316 (註:kernel版本linux 2.6.32) GSO用來擴展之前的TSO,目前已經併入upstream內核。TSO只能支持tcp協議,而GSO可以支持tcpv4, tcpv6, udp等協議。在GSO之前,skb_shinfo(skb)有兩 ...
  • 文件屬性概述(ls -lhi) linux里一切皆文件Linux系統中的文件或目錄的屬性主要包括:索引節點(inode),文件類型,許可權屬性,鏈接數,所歸屬的用戶和用戶組,最近修改時間等內容: 解釋: 第一列:inode索引節點編號(相當於人的身份證,全國唯一)第二列:文件類型及許可權第二列共11個字 ...
一周排行
    -Advertisement-
    Play Games
  • 前言 本文介紹一款使用 C# 與 WPF 開發的音頻播放器,其界面簡潔大方,操作體驗流暢。該播放器支持多種音頻格式(如 MP4、WMA、OGG、FLAC 等),並具備標記、實時歌詞顯示等功能。 另外,還支持換膚及多語言(中英文)切換。核心音頻處理採用 FFmpeg 組件,獲得了廣泛認可,目前 Git ...
  • OAuth2.0授權驗證-gitee授權碼模式 本文主要介紹如何筆者自己是如何使用gitee提供的OAuth2.0協議完成授權驗證並登錄到自己的系統,完整模式如圖 1、創建應用 打開gitee個人中心->第三方應用->創建應用 創建應用後在我的應用界面,查看已創建應用的Client ID和Clien ...
  • 解決了這個問題:《winForm下,fastReport.net 從.net framework 升級到.net5遇到的錯誤“Operation is not supported on this platform.”》 本文內容轉載自:https://www.fcnsoft.com/Home/Sho ...
  • 國內文章 WPF 從裸 Win 32 的 WM_Pointer 消息獲取觸摸點繪製筆跡 https://www.cnblogs.com/lindexi/p/18390983 本文將告訴大家如何在 WPF 裡面,接收裸 Win 32 的 WM_Pointer 消息,從消息裡面獲取觸摸點信息,使用觸摸點 ...
  • 前言 給大家推薦一個專為新零售快消行業打造了一套高效的進銷存管理系統。 系統不僅具備強大的庫存管理功能,還集成了高性能的輕量級 POS 解決方案,確保頁面載入速度極快,提供良好的用戶體驗。 項目介紹 Dorisoy.POS 是一款基於 .NET 7 和 Angular 4 開發的新零售快消進銷存管理 ...
  • ABP CLI常用的代碼分享 一、確保環境配置正確 安裝.NET CLI: ABP CLI是基於.NET Core或.NET 5/6/7等更高版本構建的,因此首先需要在你的開發環境中安裝.NET CLI。這可以通過訪問Microsoft官網下載並安裝相應版本的.NET SDK來實現。 安裝ABP ...
  • 問題 問題是這樣的:第三方的webapi,需要先調用登陸介面獲取Cookie,訪問其它介面時攜帶Cookie信息。 但使用HttpClient類調用登陸介面,返回的Headers中沒有找到Cookie信息。 分析 首先,使用Postman測試該登陸介面,正常返回Cookie信息,說明是HttpCli ...
  • 國內文章 關於.NET在中國為什麼工資低的分析 https://www.cnblogs.com/thinkingmore/p/18406244 .NET在中國開發者的薪資偏低,主要因市場需求、技術棧選擇和企業文化等因素所致。歷史上,.NET曾因微軟的閉源策略發展受限,儘管後來推出了跨平臺的.NET ...
  • 在WPF開發應用中,動畫不僅可以引起用戶的註意與興趣,而且還使軟體更加便於使用。前面幾篇文章講解了畫筆(Brush),形狀(Shape),幾何圖形(Geometry),變換(Transform)等相關內容,今天繼續講解動畫相關內容和知識點,僅供學習分享使用,如有不足之處,還請指正。 ...
  • 什麼是委托? 委托可以說是把一個方法代入另一個方法執行,相當於指向函數的指針;事件就相當於保存委托的數組; 1.實例化委托的方式: 方式1:通過new創建實例: public delegate void ShowDelegate(); 或者 public delegate string ShowDe ...