当前位置:网站首页>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,
}
边栏推荐
- .NET六大设计原则个人白话理解,有误请大神指正
- mmdetection 学习率与batch_size关系
- Tensor 省略号(三个点)切片
- B2020 points candy
- el-switch 赋值后状态不变化
- Besides lying flat, what else can a 27 year old do in life?
- Global and Chinese market of iron free motors 2022-2028: Research Report on technology, participants, trends, market size and share
- 使用JMeter对WebService进行压力测试
- QT - draw something else
- 【日常训练】395. 至少有 K 个重复字符的最长子串
猜你喜欢

【Transformer】入门篇-哈佛Harvard NLP的原作者在2018年初以逐行实现的形式呈现了论文The Annotated Transformer

el-switch 赋值后状态不变化

mysql innodb 存储引擎的特性—行锁剖析
![[opengl] advanced chapter of texture - principle of flowmap](/img/dd/6208122fcc578caaf098301b185e03.jpg)
[opengl] advanced chapter of texture - principle of flowmap

Construction of operation and maintenance system

【注意力机制】【首篇ViT】DETR,End-to-End Object Detection with Transformers网络的主要组成是CNN和Transformer

Besides lying flat, what else can a 27 year old do in life?

Yolov5系列(一)——網絡可視化工具netron

Série yolov5 (i) - - netron, un outil de visualisation de réseau
![[ue4] material and shader permutation](/img/8f/7743ac378490fcd7b9ecc5b4c2ef2a.jpg)
[ue4] material and shader permutation
随机推荐
How can entrepreneurial teams implement agile testing to improve quality and efficiency? Voice network developer entrepreneurship lecture Vol.03
Centos7 deployment sentry redis (with architecture diagram, clear and easy to understand)
Relationship between truncated random distribution and original distribution
Pytoch deep learning and target detection practice notes
Influxdb2 sources add data sources
【云原生训练营】模块七 Kubernetes 控制平面组件:调度器与控制器
[combinatorics] permutation and combination (set permutation, step-by-step processing example)
Detailed comments on MapReduce instance code on the official website
Kubernetes 进阶训练营 Pod基础
Yolov5系列(一)——網絡可視化工具netron
Troubleshooting method of CPU surge
CentOS7部署哨兵Redis(带架构图,清晰易懂)
[transformer] Introduction - the original author of Harvard NLP presented the annotated transformer in the form of line by line implementation in early 2018
Explanation of time complexity and space complexity
Yolov5 advanced nine target tracking example 1
[ue4] cascading shadow CSM
Byte practice surface longitude
【云原生训练营】模块八 Kubernetes 生命周期管理和服务发现
Basic SQL tutorial
C # realizes the login interface, and the password asterisk is displayed (hide the input password)