当前位置:网站首页>Halcon与Winform学习第二节
Halcon与Winform学习第二节
2022-07-03 15:08:00 【11eleven】
基于halconWindow设计流程自定义 视觉检测方案系统,先上效果图

主要提供 以下几大块的内容:
一、工具栏的支持
二、工具栏绘制流程集成方案可导入导出
三、工具流程节点的数据流动的输入输出
四、设备通讯
五、全局变量的使用
上图界面花了两个礼拜的时间进行实现,后续有时间的话,将一段段介绍。
方案配置贯穿整个业务
public class SchemeConfig {
public static SchemeInfo Scheme { set; get; }
public static HWindow_Final HWindowControl { set; get; }
}
public class SchemeInfo : BaseField, IEntity<long>
{
public SchemeInfo()
{
Id = GeneratePrimaryKeyIdHelper.GetPrimaryKeyId();
}
public long Id { get; set; }
/// <summary>
/// 方案编码
/// </summary>
public string Code { get; set; }
/// <summary>
/// 方案名称
/// </summary>
public string Name { get; set; }
/// <summary>
/// 备注
/// </summary>
public string Remark { get; set; }
public List<SchemeFlowInfoEntity> FlowList { set; get; }
public List<GlobalVariableModel> GlobalVariableList { set; get; }
/// <summary>
/// 设备配置
/// </summary>
public GlobalDeviceConfig GlobalDeviceConfig { set; get; }
}
public class GlobalDeviceConfig
{
public List<DeviceCommumicationClient> ClientList { set; get; } = new List<DeviceCommumicationClient>();
public List<CommumicationEventReceive> ReceiveList { set; get; } = new List<CommumicationEventReceive>();
public List<CommumicationEventSend> SendList { set; get; } = new List<CommumicationEventSend>();
}
/// <summary>
/// 图像源
/// </summary>
public class ImageSourceContentModel: SchemeFlowNodeEntity
{
public override void InitData() {
NodeResultModels = new List<NodeResultModel>();
NodeResultModels.Add(new NodeResultModel() { NodeResultCode = NodeResultTypeEnum.ImageWidth.ToString(),NodeResultName =NodeResultTypeEnum.ImageWidth.GetDescription() });
NodeResultModels.Add(new NodeResultModel() { NodeResultCode = NodeResultTypeEnum.ImageHeight.ToString(), NodeResultName = NodeResultTypeEnum.ImageHeight.GetDescription() });
}
public int DefaultImageIndex { set; get; } = -1;
public string ImageFolderPath { set; get; }
/// <summary>
/// 图像地址PATH
/// </summary>
public List<string> ImagePathList { set; get; }
}
/// <summary>
/// 几何创建
/// </summary>
public class GeometryContentModel : SchemeFlowNodeEntity
{
/// <summary>
/// ROIJSON
/// </summary>
public string RoiDataJson { set; get; }
/// <summary>
/// ROI几何
/// </summary>
public List<ROI> Regions { set; get; } = new List<ROI>();//roi集合
}
/// <summary>
/// blob
/// </summary>
public class BlobContentModel : SchemeFlowNodeEntity
{
}
/// <summary>
/// 颜色转换
/// </summary>
public class ColorRgbContentModel : SchemeFlowNodeEntity
{
}
/// <summary>
/// Result
/// </summary>
public class ConditionResultContentModel : SchemeFlowNodeEntity
{
/// <summary>
/// 判断条件 0:全部符合,1:任意条件符合
/// </summary>
public int JudgeType { set; get; }
public List<ResultConditionJudgeModel> JudgeList { set; get; } = new List<ResultConditionJudgeModel>();
public Color OkColor { set; get; }
public Color NgColor { set; get; }
public int ResultLocationX { set; get; }
public int ResultLocationY { set; get; }
}
public class ResultConditionJudgeModel {
public string VariableCode { set; get; }
public string VariableName { set; get; }
public decimal MinValue { set; get; }
public decimal MaxValue { set; get; }
}
/// <summary>
/// 工具节点类型
/// </summary>
public enum ToolNodeTypeEnum:long
{
/// <summary>
/// 图像源
/// </summary>
ImageSource=0,
/// <summary>
/// 几何
/// </summary>
Geometry=1,
/// <summary>
/// blob分析
/// </summary>
Blob=2,
/// <summary>
/// 条件结果
/// </summary>
ConditionResult=3,
/// <summary>
/// 颜色转换
/// </summary>
ColorRgb=4,
}
边栏推荐
- Redis主从、哨兵、集群模式介绍
- Tensor 省略号(三个点)切片
- Using TCL (tool command language) to manage Tornado (for VxWorks) can start the project
- 基于SVN分支开发模式流程浅析
- Global and Chinese market of lighting control components 2022-2028: Research Report on technology, participants, trends, market size and share
- [Yu Yue education] scientific computing and MATLAB language reference materials of Central South University
- ASTC texture compression (adaptive scalable texture compression)
- TPS61170QDRVRQ1
- el-switch 赋值后状态不变化
- [opengl] advanced chapter of texture - principle of flowmap
猜你喜欢
![[ue4] geometry drawing pipeline](/img/30/9fcf83a665043fe57389d44c2e16a8.jpg)
[ue4] geometry drawing pipeline

北京共有产权房出租新规实施的租赁案例
![[probably the most complete in Chinese] pushgateway entry notes](/img/5a/6dcb75f5d713ff513ad6842ff53cc3.png)
[probably the most complete in Chinese] pushgateway entry notes
![[graphics] hair simulation in tressfx](/img/41/cef55811463d3a25a29ddab5278af0.jpg)
[graphics] hair simulation in tressfx

C string format (decimal point retention / decimal conversion, etc.)

What is embedding (encoding an object into a low dimensional dense vector), NN in pytorch Principle and application of embedding

B2020 points candy

Vs+qt multithreading implementation -- run and movetothread
![[Yu Yue education] scientific computing and MATLAB language reference materials of Central South University](/img/83/922efb4f88843f1b7feaccf2b515b9.jpg)
[Yu Yue education] scientific computing and MATLAB language reference materials of Central South University

Incluxdb2 buckets create database
随机推荐
Puppet自动化运维排错案例
[combinatorics] permutation and combination (set permutation, step-by-step processing example)
[opengl] advanced chapter of texture - principle of flowmap
Kubernetes - YAML文件解读
【Transform】【NLP】首次提出Transformer,Google Brain团队2017年论文《Attention is all you need》
视觉上位系统设计开发(halcon-winform)-2.全局变量设计
Open under vs2019 UI file QT designer flash back problem
Global and Chinese market of optical fiber connectors 2022-2028: Research Report on technology, participants, trends, market size and share
【微信小程序】WXSS 模板样式
Several sentences extracted from the book "leather bag"
What is one hot encoding? In pytoch, there are two ways to turn label into one hot coding
[graphics] real shading in Unreal Engine 4
What is embedding (encoding an object into a low dimensional dense vector), NN in pytorch Principle and application of embedding
[transform] [NLP] first proposed transformer. The 2017 paper "attention is all you need" by Google brain team
高并发下之redis锁优化实战
Basic SQL tutorial
Use of Tex editor
Chapter 14 class part 1
Global and Chinese markets for ionization equipment 2022-2028: Research Report on technology, participants, trends, market size and share
5.2-5.3