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的更多相关文章

  1. 新手一步一步OpenCV+Win7+Visual Studio 2013环境配置

    地点:湖南大学软件大楼211 时间:2013.12.19 昨天导师布置了个任务,要求是找出用相机拍出同一移动场景下的两张照片,计算机能根据其中的差异计算场景移动的距离和旋转角度.据说以前很牛逼的师兄完 ...

  2. 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 ...

  3. #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 - ...

  4. 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 ...

  5. 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:   ...

  6. (C#2,.net framework2.0,Visual Studio 2003)之前版本

    (C#2,.net framework2.0,Visual Studio 2003)之前版本归为最初的版本(主要是针对.net framework),其主要定义了最基本的类型.特性. 1.基本的类型 ...

  7. 利用CMake和OpenCV源代码生成Visual Studio工程

    OpenCV1.0版本有windows,linux之分,笔者曾经一直使用Opencv1.0.这个版本在下载,安装之后,在 \OpenCV\_make文件夹下面已经存在了一个opencv.dsw的工程文 ...

  8. Visual Studio 2005 搭建Windows CE 6.0环境之准备

    Microsoft Visual Studio 2005 Visual Studio 2005 Professional 官方90天试用版英文版:http://download.microsoft.c ...

  9. Visual Studio 2013中c#语言规范5.0

    文件位置 vs安装路径 "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC#\Specifications\2052\CSharp ...

随机推荐

  1. JAXB最佳实践

    JAXB主要用来实现对象和XML之间的序列化和反序列化. 本文主要总结JAXB基本使用方法和注意事项! 通过下文的XML示例内容进行JAXB的简单实践 <?xml version="1 ...

  2. (转)ViewPager,ScrollView 嵌套ViewPager滑动冲突解决

    ViewPager,ScrollView 嵌套ViewPager滑动冲突解决 本篇主要讲解一下几个问题 粗略地介绍一下View的事件分发机制 解决事件滑动冲突的思路及方法 ScrollView 里面嵌 ...

  3. [PHP] - Laravel - 修改laravel_session的cookie名称

    修改Cookie laravel_session的名称方法: 打开文件:config\session.php 找到值:laravel_session 修改为你所需要的cookie名称即可. 当然,还有 ...

  4. WPF ListBox

    记录一些ListBox的用法 设置ListBox选中项的背景颜色 如何为标准的ListBox添加ItemClick事件 连续选择同一项时SelectionChanged 事件不响应的问题 1.设置Li ...

  5. 支持Cookie并开放了一些特殊设置项的HttpWebClient

    using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.N ...

  6. 【maven】之配置开发,测试,正式环境pom.xml文件

    在进行web程序开发,如果项目组没有使用自动化发布工具(jenkins + maven + svn + tomcat ),我们一般会使用maven的热部署来完成发布,在部署的过程中我们开发,测试,生产 ...

  7. 代码管理 – SVN

    代码管理工具也用了不少年了,整理下. 管理工具比较 用过VSS,CVS,TFS,SVN还有一个微软内部使用的不记得什么名字了.这里进行一些简单比较,重点介绍SVN的用法. CVS历史悠久,1986年就 ...

  8. 使用Spring配合Junit进行单元测试的总结

    最近公司的项目和自己的项目中都用到了spring集成junit进行单元测试,总结一下几种基本的用法: 1.直接对spring中注入的bean进行测试(以DAO为例): 在测试类上添加@RunWith注 ...

  9. 每天一个 Linux 命令(19):find 命令概览

    Linux下find命令在目录结构中搜索文件,并执行指定的操作.Linux下find命令提供了相当多的查找条件,功能很强大.由于find具有强大的功能,所以它的选项也很多,其中大部分选项都值得我们花时 ...

  10. Oracle 游标示例,带异常处理

    Oracle游标示例一则,带异常处理. DECLARE CURSOR c_dl IS SELECT ID, NSRSBH, WSPZXH, ZXYY_DM, HZRQ, SWJG_DM, GXSJ F ...