Qt wiki will be updated on October 12th 2023 starting at 11:30 AM (EEST) and the maintenance will last around 2-3 hours. During the maintenance the site will be unavailable.

How to setup Qt and openCV on Windows

From Qt Wiki
Revision as of 17:53, 2 March 2017 by Cdwijs (talk | contribs) (Added placeholders for installing a very old version of openCV, to have something that works :-))
Jump to navigation Jump to search

How to setup Qt and openCV on Windows


This article may require cleanup to meet the Qt Wiki's quality standards. Reason: Incomplete and not functional.
Please improve this article if you can. Remove the {{cleanup}} tag and add this page to Updated pages list after it's clean.

Introduction

WARNING: The below procedures are incomplete, and not functional.

This article shows how to install both Qt and openCV, and build a basic OpenCV example. This article assumes Windows 7 has just been installed.

This article uses information from the following pages: http://docs.opencv.org/2.4/doc/tutorials/introduction/windows_install/windows_install.html?highlight=installation http://www.laganiere.name/opencvCookbook/chap1s1_2.shtml

Windows, source of openCV, old version

This section is a direct copy of this guide. Only minor changes are done to make it work with a newer version of Qt.

Qt

Installation

Testing

Install Tortoisegit

Cmake

Installing Cmake

Configuring Cmake

OpenCV

Getting OpenCV

Compiling OpenCV

Installing OpenCV

Configuring OpenCV

Building and running an example

Windows, precompiled binaries, new versions

Install OpenCV

Download the newest version from sourceforge . At the time of this writing, opencv-3.2.0-vc14.exe (118MB) is the latest version. Execute the program, then enter a location with at least 460MB free. This how to assumes OpenCV to be extracted to "d:\", so the folder d:\opencv exists.

Install Qt

Download the Qt installer from www.qt.io, then choose "Download now" This will then download qt-unified-windows-x86-2.0.5-online.exe Execute the program, then choose the following settings:

welcome next
qt account skip
setup-Qt next
installation folder: D:\Qt
select components: next (accept defaults)
License Agreement: agree and next
start menu shortcuts: next
ready to install: install

Adjust Qt

Run D:\Qt\MaintenanceTool.exe then use the following options:

maintain Qt: Qt Account: Skip
Setup Qt: Add or remove components: Next
Select components: Qt-Qt5.8-MinGW 5.3.0 32 bit
Select components: tools-MinGW 5.3.0 32 bit: next :update

Configure Qt and OpenCV

Compile and run the example