当前位置:网站首页>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,
}
边栏推荐
- Matlab r2011b neural network toolbox precautions
- SQL server安装位置改不了
- 第04章_逻辑架构
- Several sentences extracted from the book "leather bag"
- Mmdetection learning rate and batch_ Size relationship
- Mysql报错:[ERROR] mysqld: File ‘./mysql-bin.010228‘ not found (Errcode: 2 “No such file or directory“)
- Relationship between truncated random distribution and original distribution
- High quality workplace human beings must use software to recommend, and you certainly don't know the last one
- 4-33--4-35
- Yolov5进阶之九 目标追踪实例1
猜你喜欢

【可能是全中文网最全】pushgateway入门笔记

What are the composite types of Blackhorse Clickhouse, an OLAP database recognized in the industry

Didi off the shelf! Data security is national security

5.4-5.5

cpu飙升排查方法

解决pushgateway数据多次推送会覆盖的问题

复合类型(自定义类型)

Devaxpress: range selection control rangecontrol uses

【pytorch学习笔记】Datasets and Dataloaders
![[probably the most complete in Chinese] pushgateway entry notes](/img/5a/6dcb75f5d713ff513ad6842ff53cc3.png)
[probably the most complete in Chinese] pushgateway entry notes
随机推荐
Matlab r2011b neural network toolbox precautions
The state does not change after the assignment of El switch
C # realizes the login interface, and the password asterisk is displayed (hide the input password)
mysql innodb 存储引擎的特性—行锁剖析
[ue4] material and shader permutation
[opengl] advanced chapter of texture - principle of flowmap
Relationship between truncated random distribution and original distribution
解决pushgateway数据多次推送会覆盖的问题
redis缓存穿透,缓存击穿,缓存雪崩解决方案
[probably the most complete in Chinese] pushgateway entry notes
Global and Chinese market of solder bars 2022-2028: Research Report on technology, participants, trends, market size and share
Global and Chinese market of air cargo logistics 2022-2028: Research Report on technology, participants, trends, market size and share
Explanation of time complexity and space complexity
Global and Chinese market of postal automation systems 2022-2028: Research Report on technology, participants, trends, market size and share
Using TCL (tool command language) to manage Tornado (for VxWorks) can start the project
[Yu Yue education] scientific computing and MATLAB language reference materials of Central South University
Devaxpress: range selection control rangecontrol uses
Centos7 deployment sentry redis (with architecture diagram, clear and easy to understand)
C string format (decimal point retention / decimal conversion, etc.)
什么是embedding(把物体编码为一个低维稠密向量),pytorch中nn.Embedding原理及使用