图漾相机-Windows QT配置教程

文章目录

  • 一、安装QT和新建工程
  • 二、配置opencv环境变量
  • 三、配置Qt工程opencv依赖
  • 四、测试opencv环境
  • 五、配置图漾sdk环境并测试

一、安装QT和新建工程

确保QT已经安装了C++, 先用QT新建MSVC64位新工程。 Qt安装Windows调试器:
https://developer.microsoft.com/zh-cn/windows/downloads/windows-10-sdk
选择“下载安装程序”,下载“winsdksetup.exe”;
图漾相机-Windows QT配置教程_第1张图片

二、配置opencv环境变量

图漾相机-Windows QT配置教程_第2张图片

三、配置Qt工程opencv依赖

图漾相机-Windows QT配置教程_第3张图片

INCLUDEPATH += D:\Project_info\opencv\build\include
INCLUDEPATH +=D:\Project_info\opencv\build\include\opencv2
INCLUDEPATH +=D:\Project_info\opencv\build\include\opencv
win32:CONFIG(release, debug|release): LIBS += -LD:/Project_info/opencv/build/x64/vc14/lib/-lopencv_world341 else:win32:CONFIG(debug, debug|release): LIBS += -LD:/Project_info/opencv/build/x64/vc14/lib/ -lopencv_world341d
INCLUDEPATH += D:/Project_info/opencv/build/x64/vc14
DEPENDPATH += D:/Project_info/opencv/build/x64/vc14

四、测试opencv环境

图漾相机-Windows QT配置教程_第4张图片

Mat image=imread(“D:\image\1.png”);
namedWindow( “Display window”,
WINDOW_AUTOSIZE ); imshow( “Display window”, image )
图漾相机-Windows QT配置教程_第5张图片

五、配置图漾sdk环境并测试

INCLUDEPATH += D:/camport3-master-1.5.20/sample/common
D:/camport3-master-1.5.20/include
D:/camport3-master-1.5.20/sample/common/cloud_viewer/freeglut/include
D:/camport3-master-1.5.20/sample/common/cloud_viewer
D:/camport3-master-1.5.20/sample/build/freeglut_install/include

LIBS += D:/camport3-master-1.5.20/lib/win/hostapp/x64/tycam.lib
D:/camport3-master-1.5.20/sample/build/Debug/cloud_viewer.lib\

测试即可查看图漾sample中的例程,加入头文件,和导入库 TYInitLib 的测试。如果无报错,说明已经配置成功。
图漾相机-Windows QT配置教程_第6张图片

你可能感兴趣的:(图漾相机,qt5,c++,开发语言,计算机视觉)