Ubuntu 16.04 LTS under Configuration OpenCV and QT

Source: Internet
Author: User

Assuming you're already installed.

    • Qt
    • Cmake-gui, installation method, sudo get-apt install Cmake-gui
    • Download good OpenCV3.3.0 https://opencv.org/releases.html Select sources Download

Body:

    1. Download Base dependency Package
      sudo apt-get install Libgtk2.0-dev and pkg-config
    2. open Cmake-gui, install Cmake-gui very simple, sudo get-apt
    3. Extract OpenCV sources to home/usr, rename to OpenCV, create a new folder build under that directory, and then use CMake
      where is the source code: OpenCV that folder
      Where do build the new build folder under the BINARIES:OPENCV
      Tick advanced
      Click Configure, the dialog box that pops up selects Unix makefiles Then click Finish
      IPPICV will usually download for a long time, this everyone can download to the network, covering to/HOME/LAB/OPENCV/.CACHE/IPPICV Lab is your username, and then re-configure

       

    4. When you are finished, select Build_opencv_world and then click Configure
      Configure complete, click Generate, Close Cmake-gui
    5. Go to the newly created build folder, right-click on the terminal Input command
      sudo make
    6. wait 1W, OK

      This step actually starts the formal compilation, and then the Lib include is added to your system directory

    7. Create a new Opencv.pri in the Build folder and enter the following command
      Includepath + =/usr/local/include
      LIBS +-l/usr/local/lib \
      & nbsp;   -lopencv_world
      Save, close
    8. create a new QT document, write to the Pro file:
      include (/home/lab/opencv/ BUILD/OPEN.PRI)
    9. then you can use it and test it!

Ubuntu 16.04 LTS configuration OpenCV and Qt

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.