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 ...
随机推荐
- Inventor 2014 sp1/sp2激活
问题: win8.1 inventor2014,不打补丁不兼容: 打了补丁xforce激活始终无法成功. 解决: 1. 使用未打补丁之前的 adlmact.dll 和 adlmact_libFNP.d ...
- 01 Linux档案与目录管理
1. 目录与路径 1.1绝对路径和相对路径 绝对路径:一定有根目录/写起,例如:/usr/share/doc 相对路径:不是由根目录/写起,例如:由/usr/sha ...
- Lab_6_SysOps_AutoScaling_Linux_v2.5
System Operations - Lab 6: Using Amazon Elastic Load Balancer (Linux) - 2.5 ======================== ...
- <<Exceptional C++>> notes
- class Complex { public: ) : real_(real), imaginary_(imaginary) { } Complex& operaor+=(const Co ...
- mfc MemoryAdressRead
内涵图 address
- 飘逸的python - 增强的格式化字符串format函数
自python2.6开始,新增了一种格式化字符串的函数str.format(),可谓威力十足.那么,他跟之前的%型格式化字符串相比,有什么优越的存在呢?让我们来揭开它羞答答的面纱. 语法 它通过{}和 ...
- [Linux] 关于Centos6中ulimit nproc用户进程数的限制
一.缘由: 在启动mongodb的时候,有Warning提示soft rlimits too low,就是用户使用进程数过小,遂调高系统资源关于用户最大进程数的限制ulimit -u. 先暂时使设置生 ...
- Jmeter测试数据库
1.创建线程组 2.右键 Thread Group -> add ConfigElement -> JDBC Connection Configuration创建一个JDBC配置 (这有个 ...
- (document).height()与$(window).height()
jQuery(window).height()代表了当前可见区域的大小,而jQuery(document).height()则代表了整个文档的高度,可视具体情况使用. 注意当浏览器窗口大小改变时(如最 ...
- myBatis之事务管理
1. myBatis单独使用时,使用SqlSession来处理事务: public class MyBatisTxTest { private static SqlSessionFactory sql ...