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:
- Download Base dependency Package
sudo apt-get install Libgtk2.0-dev and pkg-config
- open Cmake-gui, install Cmake-gui very simple, sudo get-apt
- 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
- When you are finished, select Build_opencv_world and then click Configure
Configure complete, click Generate, Close Cmake-gui
- Go to the newly created build folder, right-click on the terminal Input command
sudo make
- wait 1W, OK
This step actually starts the formal compilation, and then the Lib include is added to your system directory
- 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
- create a new QT document, write to the Pro file:
include (/home/lab/opencv/ BUILD/OPEN.PRI)
- then you can use it and test it!
Ubuntu 16.04 LTS configuration OpenCV and Qt