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
  • 移動開發(一):使用.NET MAUI開發第一個安卓APP 對於工作多年的C#程式員來說,近來想嘗試開發一款安卓APP,考慮了很久最終選擇使用.NET MAUI這個微軟官方的框架來嘗試體驗開發安卓APP,畢竟是使用Visual Studio開發工具,使用起來也比較的順手,結合微軟官方的教程進行了安卓 ...
  • 前言 QuestPDF 是一個開源 .NET 庫,用於生成 PDF 文檔。使用了C# Fluent API方式可簡化開發、減少錯誤並提高工作效率。利用它可以輕鬆生成 PDF 報告、發票、導出文件等。 項目介紹 QuestPDF 是一個革命性的開源 .NET 庫,它徹底改變了我們生成 PDF 文檔的方 ...
  • 項目地址 項目後端地址: https://github.com/ZyPLJ/ZYTteeHole 項目前端頁面地址: ZyPLJ/TreeHoleVue (github.com) https://github.com/ZyPLJ/TreeHoleVue 目前項目測試訪問地址: http://tree ...
  • 話不多說,直接開乾 一.下載 1.官方鏈接下載: https://www.microsoft.com/zh-cn/sql-server/sql-server-downloads 2.在下載目錄中找到下麵這個小的安裝包 SQL2022-SSEI-Dev.exe,運行開始下載SQL server; 二. ...
  • 前言 隨著物聯網(IoT)技術的迅猛發展,MQTT(消息隊列遙測傳輸)協議憑藉其輕量級和高效性,已成為眾多物聯網應用的首選通信標準。 MQTTnet 作為一個高性能的 .NET 開源庫,為 .NET 平臺上的 MQTT 客戶端與伺服器開發提供了強大的支持。 本文將全面介紹 MQTTnet 的核心功能 ...
  • Serilog支持多種接收器用於日誌存儲,增強器用於添加屬性,LogContext管理動態屬性,支持多種輸出格式包括純文本、JSON及ExpressionTemplate。還提供了自定義格式化選項,適用於不同需求。 ...
  • 目錄簡介獲取 HTML 文檔解析 HTML 文檔測試參考文章 簡介 動態內容網站使用 JavaScript 腳本動態檢索和渲染數據,爬取信息時需要模擬瀏覽器行為,否則獲取到的源碼基本是空的。 本文使用的爬取步驟如下: 使用 Selenium 獲取渲染後的 HTML 文檔 使用 HtmlAgility ...
  • 1.前言 什麼是熱更新 游戲或者軟體更新時,無需重新下載客戶端進行安裝,而是在應用程式啟動的情況下,在內部進行資源或者代碼更新 Unity目前常用熱更新解決方案 HybridCLR,Xlua,ILRuntime等 Unity目前常用資源管理解決方案 AssetBundles,Addressable, ...
  • 本文章主要是在C# ASP.NET Core Web API框架實現向手機發送驗證碼簡訊功能。這裡我選擇是一個互億無線簡訊驗證碼平臺,其實像阿裡雲,騰訊雲上面也可以。 首先我們先去 互億無線 https://www.ihuyi.com/api/sms.html 去註冊一個賬號 註冊完成賬號後,它會送 ...
  • 通過以下方式可以高效,並保證數據同步的可靠性 1.API設計 使用RESTful設計,確保API端點明確,並使用適當的HTTP方法(如POST用於創建,PUT用於更新)。 設計清晰的請求和響應模型,以確保客戶端能夠理解預期格式。 2.數據驗證 在伺服器端進行嚴格的數據驗證,確保接收到的數據符合預期格 ...