-
-
Notifications
You must be signed in to change notification settings - Fork 745
Graphical User Interface: QT
Andrews Sobral edited this page Mar 7, 2020
·
10 revisions
-
Download binaries for Windows (x86/x64):
-
- Download bgslibrary2_qtgui_opencv320_x64.zip
-
Dependencies:
-
- OpenCV 2.x or 3.x (Tested with OpenCV 3.2.0)
-
- Qt 5 library (Tested with Qt 5.6.2)
-
Click on 'Qt 5.6 64-bit for Desktop (MSVC 2015)'
-
Go to bgslibrary/gui_qt/build folder.
-
Set your OpenCV PATH:
set OpenCV_DIR=C:\OpenCV3.2.0\build
- Launch CMAKE:
cmake -DOpenCV_DIR=%OpenCV_DIR% -G "Visual Studio 14 Win64" ..
- Include OpenCV binaries in the system path:
set PATH=%PATH%;%OpenCV_DIR%\x64\vc14\bin
-
Open the bgslibrary_gui.sln file in your Visual Studio and switch to 'RELEASE' mode
-
Click on 'ALL_BUILD' project and build!
-
Go to bgslibrary/gui_qt/build/Release and copy bgslibrary_gui.exe to bgslibrary/.
-
Run bgslibrary_gui.exe and enjoy! ;-)
- Installing dependencies on Mac OS X:
brew install opencv3 --with-ffmpeg --with-qt5 --HEAD
brew link --overwrite --dry-run opencv3
- Step-by-step Instructions
git clone --recursive https://github.com/andrewssobral/bgslibrary.git
cd bgslibrary/gui_qt/build
cmake ..
make
cp bgslibrary_gui ../../
./bgslibrary_gui
- Possible issues:
If you have something like this:
CMake Warning at CMakeLists.txt:33 (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.
CMake Error at CMakeLists.txt:44 (QT5_ADD_RESOURCES):
Unknown CMake command "QT5_ADD_RESOURCES".
-- Configuring incomplete, errors occurred!
You just need to specify the PATH of your QT installation, for example:
On Linux:
cmake .. -DCMAKE_PREFIX_PATH=$HOME/Qt/5.12.1/gcc_64
On MacOS:
cmake .. -DCMAKE_PREFIX_PATH=$HOME/Qt/5.13.0/clang_64