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 ...
随机推荐
- 安装oracle数据库,登录 时无法连接目标机
oracle11g 在dos命令里输入输入sqlplus 输入如用户名: 输入口令: 还是无法连接 解决办法: 输入sqlplus/nolog按enter键再输入conn/as sysdba就好了
- centos安装mongodb 3.2.9
centos 6.5 x64 1.下载地址:用迅雷下载,直接下载下不动 https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-rhel62-3.2 ...
- ubuntu安装php5.3
sudo -i wget http://in1.php.net/distributions/php-5.3.29.tar.bz2 .tar.bz2 cd php- apt-get install li ...
- [PHP] - Laravel 5 的 Hello Wold
吐槽一段 整了半天,Laravel下载麻烦得可以去死.先要安装composer,而composer又被共墙了,之后又要安装git,安装完git还要注册git,等等.... 最终放弃这种玩法,太恶心了. ...
- 用两个Stack来实现一个Queue
import java.util.Stack; /** * 问题:用两个Stack来实现一个Queue; * 方法:栈的特点是先进后出:而队列的特点是先进先出: * 用两个栈正好能把顺序调过来: * ...
- OAF_开发系列20_实现OAF打印功能
ddddd 添加一个页面级的button区域:pagebuttonBar,在之下添加button item ,这里主要设置的参数有:采用默认的oaf的打印按钮的id名称: IcxPrintablePa ...
- 使用JavaScript的Join方法
在本例中,我们将创建一个数组,然后把它的所有元素放入一个字符串: <script type="text/javascript"> var arr = new Array ...
- Java基础语法目录
一.Java相关科普知识1.Java的发展历程2.Java的发展方向3.Java的体系特性二.Java第一个程序1.JavaJDK的安装与环境的配置2.记事本开发Java程序的注意事项与常见问题3.J ...
- 使用WinRAR创建可执行程序(例如:Java程序打包 成exe)
不管你是java.c.还是xx程序,只要打包成可以双击运行/或者命令行运行,都可以用WinRAR软件生成压缩格式的exe文件,目标电脑可以没安装解压软件,依然可以运行解压. 第一步:准备压缩的所有文件 ...
- 通过JS简单实现图片缩放
;display: none;cursor: pointer;} #FullScreenDiv{;display: none;background-color: #919191;filter: alp ...