资源简介
实现VS2015、Qt5、Halcon混合编程,在VS2015中调用Qt库编写Qt界面,然后再在槽函数中调用Halcon算法。资源中有混合编程的简单实现代码和具体的操作手册,操作手册中有Qt5在VS2015的开发环境配置方法,也有Halcon在VS2015中的环境配置方法。
代码片段和文件信息
///////////////////////////////////////////////////////////////////////////////
// File generated by HDevelop for HALCON/C++ Version 17.12
///////////////////////////////////////////////////////////////////////////////
#ifndef __APPLE__
# include “HalconCpp.h“
# include “HDevThread.h“
# if defined(__linux__) && !defined(__arm__) && !defined(NO_EXPORT_APP_MAIN)
# include
# endif
#else
# ifndef HC_LARGE_IMAGES
# include
# include
# else
# include
# include
# endif
# include
# include
# include
#endif
using namespace HalconCpp;
#ifndef NO_EXPORT_MAIN
// Main procedure
void action()
{
// Local iconic variables
Hobject ho_Image ho_Region ho_ConnectedRegions;
Hobject ho_SelectedRegions;
// Local control variables
HTuple hv_RawDataFolder hv_Width hv_Height;
HTuple hv_WindowHandle;
dev_update_off();
hv_RawDataFolder = “E:/code/Photo/clip“;
ReadImage(&ho_Image hv_RawDataFolder);
GetImageSize(ho_Image &hv_Width &hv_Height);
if (HDevWindowStack::IsOpen())
CloseWindow(HDevWindowStack::Pop());
SetWindowAttr(“background_color““black“);
OpenWindow(00hv_Widthhv_Height0“visible“““&hv_WindowHandle);
HDevWindowStack::Push(hv_WindowHandle);
set_display_font(hv_WindowHandle 16 “mono“ “true“ “false“);
if (HDevWindowStack::IsOpen())
DispObj(ho_Image HDevWindowStack::GetActive());
disp_message(hv_WindowHandle “Original image“ “window“ 12 12 “black“ “true“);
disp_continue_message(hv_WindowHandle “black“ “true“);
//stop ()
//Segment the pill in the center.
//Threshold使用全局阈值分割图像,获取像素值介于MinGray-0和MaxGray-10的区域。
Threshold(ho_Image &ho_Region 0 128);
//Connection计算输入区域中的所有连通域
Connection(ho_Region &ho_ConnectedRegions);
SelectShape(ho_ConnectedRegions &ho_SelectedRegions “area“ “and“ 5000 9000);
if (HDevWindowStack::IsOpen())
DispObj(ho_SelectedRegions HDevWindowStack::GetActive());
}
#ifndef NO_EXPORT_APP_MAIN
#ifdef __APPLE__
// On OS X systems we must have a CFRunLoop running on the main thread in
// order for the HALCON graphics operators to work correctly and run the
// action function in a separate thread. A CFRunLoopTimer is used to make sure
// the action function is not called before the CFRunLoop is running.
// Note that starting with macOS 10.12 the run loop may be stopped when a
// window is closed so we need to put the call to CFRunLoopRun() into a loop
// of its own.
HTuple gStartMutex;
H_pthread_t gActionThread;
HBOOL gTerminate = FALSE;
static void timer_callback(CFRunLoopTimerRef timer void *info)
{
UnlockMutex(gStartMutex);
}
static Herror apple_action(void **parameters)
{
// Wait until the timer has fired to start processing.
LockMutex(gStartMutex);
UnlockMutex(gStartMutex);
try
{
action();
}
catch (HEx
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 657080 2018-06-27 15:12 VS2015_Qt5_Halcon混合编程\Halcon导出的程序\外部函数\read_thresholdImage.h
文件 5489 2018-06-27 15:08 VS2015_Qt5_Halcon混合编程\Halcon导出的程序\程序\read_thresholdImage.cpp
..A..H. 28160 2018-06-28 13:26 VS2015_Qt5_Halcon混合编程\helloQt\.vs\helloQt\v14\.suo
文件 290173 2003-11-04 16:33 VS2015_Qt5_Halcon混合编程\helloQt\clip.png
文件 3683 2018-06-28 13:25 VS2015_Qt5_Halcon混合编程\helloQt\helloQt\GeneratedFiles\Debug\moc_helloqt.cpp
文件 1396 2018-06-28 13:25 VS2015_Qt5_Halcon混合编程\helloQt\helloQt\GeneratedFiles\qrc_helloqt.cpp
文件 4163 2018-06-28 13:25 VS2015_Qt5_Halcon混合编程\helloQt\helloQt\GeneratedFiles\ui_helloqt.h
文件 11681 2018-06-28 13:26 VS2015_Qt5_Halcon混合编程\helloQt\helloQt\helloqt.cpp
文件 1176 2018-06-27 20:47 VS2015_Qt5_Halcon混合编程\helloQt\helloQt\helloqt.h
文件 67 2018-06-27 17:18 VS2015_Qt5_Halcon混合编程\helloQt\helloQt\helloqt.qrc
文件 2020 2018-06-28 09:45 VS2015_Qt5_Halcon混合编程\helloQt\helloQt\helloqt.ui
文件 18918 2018-06-28 09:07 VS2015_Qt5_Halcon混合编程\helloQt\helloQt\helloQt.vcxproj
文件 2675 2018-06-27 17:19 VS2015_Qt5_Halcon混合编程\helloQt\helloQt\helloQt.vcxproj.filters
文件 639 2018-06-27 17:21 VS2015_Qt5_Halcon混合编程\helloQt\helloQt\helloQt.vcxproj.user
文件 173 2018-06-27 17:18 VS2015_Qt5_Halcon混合编程\helloQt\helloQt\main.cpp
文件 2921 2018-06-28 13:25 VS2015_Qt5_Halcon混合编程\helloQt\helloQt\x64\Debug\helloQt.Build.CppClean.log
文件 237 2018-06-28 13:26 VS2015_Qt5_Halcon混合编程\helloQt\helloQt\x64\Debug\helloQt.log
文件 447327 2018-06-28 13:26 VS2015_Qt5_Halcon混合编程\helloQt\helloQt\x64\Debug\helloqt.obj
文件 5134 2018-06-28 13:26 VS2015_Qt5_Halcon混合编程\helloQt\helloQt\x64\Debug\helloQt.tlog\CL.command.1.tlog
文件 202960 2018-06-28 13:26 VS2015_Qt5_Halcon混合编程\helloQt\helloQt\x64\Debug\helloQt.tlog\CL.read.1.tlog
文件 2806 2018-06-28 13:26 VS2015_Qt5_Halcon混合编程\helloQt\helloQt\x64\Debug\helloQt.tlog\CL.write.1.tlog
文件 2146 2018-06-28 13:25 VS2015_Qt5_Halcon混合编程\helloQt\helloQt\x64\Debug\helloQt.tlog\custombuild.command.1.tlog
文件 632 2018-06-28 13:25 VS2015_Qt5_Halcon混合编程\helloQt\helloQt\x64\Debug\helloQt.tlog\custombuild.read.1.tlog
文件 998 2018-06-28 13:25 VS2015_Qt5_Halcon混合编程\helloQt\helloQt\x64\Debug\helloQt.tlog\custombuild.write.1.tlog
文件 224 2018-06-28 13:26 VS2015_Qt5_Halcon混合编程\helloQt\helloQt\x64\Debug\helloQt.tlog\helloQt.lastbuildstate
文件 2298 2018-06-28 13:26 VS2015_Qt5_Halcon混合编程\helloQt\helloQt\x64\Debug\helloQt.tlog\li
文件 4482 2018-06-28 13:26 VS2015_Qt5_Halcon混合编程\helloQt\helloQt\x64\Debug\helloQt.tlog\li
文件 1122 2018-06-28 13:26 VS2015_Qt5_Halcon混合编程\helloQt\helloQt\x64\Debug\helloQt.tlog\li
文件 124656 2018-06-28 13:25 VS2015_Qt5_Halcon混合编程\helloQt\helloQt\x64\Debug\main.obj
文件 128333 2018-06-28 13:25 VS2015_Qt5_Halcon混合编程\helloQt\helloQt\x64\Debug\moc_helloqt.obj
............此处省略29个文件信息
- 上一篇:CNN手势识别
- 下一篇:2017-广东工业大学数据库实验报告完整版
相关资源
- Halcon鼠标支持图像的缩放、平移
- 基于Qt5.7的2048小游戏
- QT5.9 serialport串口通信模块,编写一个
- QT+Opencv2+VS2012 使用多线程显示网络摄
- 手势识别项目源码(vs2015)
- qt简单仿mstsc连接远程桌面源码使用
- 基于QT的网络音乐播放器
- win32平台的opencv3.4.2
- qt5-qtwebkit-5.9.1-1.el7.64_32
- QtOpencvImageGUI
- 形状匹配find_scaled_shape_model
- QtitanRibbon4.12.0 支持vs2015
- 基于ORB算法的特征提取和匹配(VS20
- 基于SIFT算法的特征提取(VS2015+OpenC
- QT5.7 + OPENCV3.2 + 动态条形码识别
- CodeEditor
- halcon.zip
- SocketChatRoom-master.rar
- texstudio-2.12.22-win-qt5.zip
- VS2015编译的OpenCV4.1.2
- Tesseract4+vs2015工程
- 基于Qt5.9.1(MSVC) PJSIP网络电话源代码
- halcon12-破解.rar
- Halcon深度学习手写数字识别代码
- Halcon 编程算子详解PDF
- Halcon学习
- snap7库在qt5下的配置程序存档
- opencv-3.4.1(with contrib) 「vs2015(vc1
- OpenCV3.4.0 vs2015 win64 + cmake编译生成的
- halcon自带样例,大部分语句含中文注
评论
共有 条评论