Setup QT 5.5.1 + OpenCV 3.0 + Visual Studio 2013 on windows 10
1. Install Visual studio 2013 community version which is free to use for personal usage.
2. Setup the debugger follow the instruction in http://doc.qt.io/qtcreator/creator-debugger-engines.html. On windows can go to link
https://msdn.microsoft.com/en-us/library/windows/hardware/ff551063(v=vs.85).aspx to download and install Debugging Tools for Windows.
3. Install OpenCV 3.0
4. Use CMake create OpenCv 2013 solutions.
5. Build OpenCv project, target platform choose x86. ( OpenCv 3.00 cannot build success if target x64 platform)
6. Install QT. Download qt-opensource-windows-x86-msvc2013-5.5.1.exe and install. (Can not use qt-opensource-windows-x86-msvc2013_64-5.5.0.exe, because no 64 bit dynamic library available)
7. Create a QTConsole project in QT creator. Add the below blue code to the QTConsole.pro file. (Please change the include path and library path to the real path on your PC)
QT += core
QT -= gui
TARGET = QTConsole
CONFIG += console
CONFIG -= app_bundle
TEMPLATE = app
INCLUDEPATH += C:/Users/shenxiao/Downloads/opencv/build/include
LIBS += -LC:/Tools/OpenCV_MyBuild/lib/Debug \
opencv_core300d.lib \
opencv_highgui300d.lib \
opencv_imgproc300d.lib \
opencv_features2d300d.lib \
opencv_calib3d300d.lib \
opencv_videoio300d.lib \
opencv_video300d.lib \
opencv_imgcodecs300d.lib\
SOURCES += main.cpp 8. Change the main.cpp to code as below.
#include <QCoreApplication>
#include "opencv2/core/core.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "opencv/cv.h" void Test()
{
cv::Mat mat;
mat = cv::imread("C:\\Test\\QTConsole\\img.jpg");
if ( mat.empty() )
return;
cvNamedWindow("hello");
cv::imshow("hello",mat); cvWaitKey(); cv::destroyWindow("hello");
} int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
Test();
printf("hello world");
getchar();
return a.exec();
}
9. Run QMake, build and then press F5 to run with debug.
If the application can not start, then need to copy all the opencv build .dll files to the debug folder, together with the exe file.
Setup QT 5.5.1 + OpenCV 3.0 + Visual Studio 2013 on windows 10的更多相关文章
- 新手一步一步OpenCV+Win7+Visual Studio 2013环境配置
地点:湖南大学软件大楼211 时间:2013.12.19 昨天导师布置了个任务,要求是找出用相机拍出同一移动场景下的两张照片,计算机能根据其中的差异计算场景移动的距离和旋转角度.据说以前很牛逼的师兄完 ...
- Compiling Qt 5.5.1 (With Qtwebkit) With Visual Studio 2015
I usually avoid writing articles about building a specific version of a software project but this ti ...
- #error : Xiron Platform Abstraction Layer - Win32 - Microsoft Visual Studio versions above 2010 (10.0) are not supported! 解决方案
OpenNI1.5 VS2013配置环境后,编译会出现这个错误: 错误 error C1189: #error : Xiron Platform Abstraction Layer - Win32 - ...
- Visual Studio 2013 Ultimate & IIS Express 8.0 错误 [iisexpress.exe”已退出,返回值为 -1073741816 (0xc0000008)] 解决方法
1. 开发环境 Visual Studio 2013 Ultimate IIS 8.0 Express 2. 错误信息 错误提示:iisexpress.exe”已退出,返回值为 -1073741816 ...
- OpenCV:Visual Studio 2013 Ultimate中OpenCV 2.4.8 配置
配置环境: 操作系统:Win8.1 64位 IDE平台:Visual Studio 2013 Ultimate 一.准备OpenCV 2.4.8 1.下载:从官网下载 OpenCV2.4.8: ...
- (C#2,.net framework2.0,Visual Studio 2003)之前版本
(C#2,.net framework2.0,Visual Studio 2003)之前版本归为最初的版本(主要是针对.net framework),其主要定义了最基本的类型.特性. 1.基本的类型 ...
- 利用CMake和OpenCV源代码生成Visual Studio工程
OpenCV1.0版本有windows,linux之分,笔者曾经一直使用Opencv1.0.这个版本在下载,安装之后,在 \OpenCV\_make文件夹下面已经存在了一个opencv.dsw的工程文 ...
- Visual Studio 2005 搭建Windows CE 6.0环境之准备
Microsoft Visual Studio 2005 Visual Studio 2005 Professional 官方90天试用版英文版:http://download.microsoft.c ...
- Visual Studio 2013中c#语言规范5.0
文件位置 vs安装路径 "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC#\Specifications\2052\CSharp ...
随机推荐
- About SSDT BI
Welcome to Microsoft Marketing Speak hell. With the 2012 release of SQL Server, the BIDS, Business I ...
- javascript基础二数据类型
1.数据类型 javascript中的基本数据类型有4中,undefined,number,string,boolean 1.1 typeof关键字 typeof关键字可以获取一个变量的的类型.先举个 ...
- Arrays和Collection之间的转换
1.将数组转换成固定大小的列表: public static <T> List<T> asList(T... a)参数 T... a:数组元素 返回值 List<T> ...
- flash flex 程序出现错误 Error #2032
解决思路参考: http://www.cnblogs.com/enjoyprogram/archive/2012/06/21/2557615.html 有可能是这种情况: 状况:在安装flshbuil ...
- OAF_开发系列16_实现OAF与XML Publisher整合
http://wenku.baidu.com/link?url=y2SFKHP5qqn4bl_iNeqLGjXsTvhyFuhkMraIbWZdTXbzcv0vTefrZFFBDWie0cAAKuTw ...
- maven scope含义的说明
依赖范围控制哪些依赖在哪些classpath 中可用,哪些依赖包含在一个应用中.让我们详细看一下每一种范围: compile (编译范围) compile是默认的范围:如果没有提供一个范围,那该依赖的 ...
- CentOS下安装LAMP环境
1.安装Apache yum -y install httpd # 开机自启动 chkconfig httpd on # 启动httpd 服务 service httpd start #安装apach ...
- [SQL]收缩数据库日志
SELECT NAME, recovery_model_desc FROM sys.databases --查看数据库的模式 ALTER DATABASE TOMS SET RECOVERY SIMP ...
- 数据结构与算法(1)支线任务4——Lowest Common Ancestor of a Binary Tree
题目如下:https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-tree/ Given a binary tree, fin ...
- [POJ2151]Check the difficulty of problems (概率dp)
题目链接:http://poj.org/problem?id=2151 题目大意:有M个题目,T支队伍,第i个队伍做出第j个题目的概率为Pij,问每个队伍都至少做出1个题并且至少有一个队伍做出N题的概 ...