当前位置:网站首页>Visual host system design and development (Halcon WinForm)
Visual host system design and development (Halcon WinForm)
2022-07-03 15:19:00 【11eleven】
- This paper introduces the idea of how to realize a visual upper scheme configuration system , be based on C# winform, Native controls for interface design , technological process UI Interaction , And operator calls , Equipment communication, etc .
- The design idea is roughly based on the operator of visual Library , Encapsulate the operator into a single tool node , For example, image import , Color conversion , Area rendering , Threshold analysis , Result judgment and so on , You can customize the input parameters of the node according to the project situation , Operation parameters , So as to get the execution result . In addition, the device communication drives the flow of global variables , The output of the final result completes the whole detection work .
- The visual upper module is roughly divided into the following modules
- Program process management
- Process node relationship
- Global variable management
- Image drawing preview function
- Equipment communication control
- Node operator execution method
- Results output , Image output
- Let's start with a few renderings . Subsequent articles will analyze the functions from these blocks .
- Data objects are : programme , technological process 、 Process nodes 、 Node basic information 、 Equipment information 、 Device event information 、 Operator matching function 、 Global variables 、 wait
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>
/// Scheme code
/// </summary>
public string Code { get; set; }/// <summary>
/// Program name
/// </summary>
public string Name { get; set; }/// <summary>
/// remarks
/// </summary>
public string Remark { get; set; }
public List<SchemeFlowInfoEntity> FlowList { set; get; }
public List<GlobalVariableModel> GlobalVariableList { set; get; }/// <summary>
/// Device configuration
/// </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>
/// Image source
/// </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>
/// Image address PATH
/// </summary>
public List<string> ImagePathList { set; get; }}
/// <summary>
/// Geometry creation
/// </summary>
public class GeometryContentModel : SchemeFlowNodeEntity
{/// <summary>
/// ROIJSON
/// </summary>
public string RoiDataJson { set; get; }/// <summary>
/// ROI The geometric
/// </summary>
public List<ROI> Regions { set; get; } = new List<ROI>();//roi aggregate}
/// <summary>
/// blob
/// </summary>
public class BlobContentModel : SchemeFlowNodeEntity
{public override void InitData()
{
}
}/// <summary>
/// Color conversion
/// </summary>
public class ColorRgbContentModel : SchemeFlowNodeEntity
{
}/// <summary>
/// Result
/// </summary>
public class ConditionResultContentModel : SchemeFlowNodeEntity
{
/// <summary>
/// Judge the condition 0: All in line ,1: Any condition meets
/// </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>
/// Tool node type
/// </summary>
public enum ToolNodeTypeEnum:long
{
/// <summary>
/// Image source
/// </summary>
ImageSource=0,
/// <summary>
/// The geometric
/// </summary>
Geometry=1,
/// <summary>
/// blob analysis
/// </summary>
Blob=2,
/// <summary>
/// Conditional results
/// </summary>
ConditionResult=3,
/// <summary>
/// Color conversion
/// </summary>
ColorRgb=4,
}

边栏推荐
- Idea does not specify an output path for the module
- Detailed comments on MapReduce instance code on the official website
- 使用JMeter对WebService进行压力测试
- Mmdetection learning rate and batch_ Size relationship
- Global and Chinese markets for ionization equipment 2022-2028: Research Report on technology, participants, trends, market size and share
- High quality workplace human beings must use software to recommend, and you certainly don't know the last one
- 【云原生训练营】模块八 Kubernetes 生命周期管理和服务发现
- [cloud native training camp] module VIII kubernetes life cycle management and service discovery
- Win10 enterprise 2016 long term service activation tutorial
- Using TCL (tool command language) to manage Tornado (for VxWorks) can start the project
猜你喜欢

Concurrency-02-visibility, atomicity, orderliness, volatile, CAS, atomic class, unsafe

el-switch 赋值后状态不变化

Composite type (custom type)

视觉上位系统设计开发(halcon-winform)-5.相机

What is one hot encoding? In pytoch, there are two ways to turn label into one hot coding

Kubernetes 进阶训练营 Pod基础

Troubleshooting method of CPU surge

C语言刷题~Leetcode与牛客网简单题

【Transform】【NLP】首次提出Transformer,Google Brain团队2017年论文《Attention is all you need》

Final review points of human-computer interaction
随机推荐
阿特拉斯atlas扭矩枪 USB通讯教程基于MTCOM
Kubernetes advanced training camp pod Foundation
Global and Chinese market of iron free motors 2022-2028: Research Report on technology, participants, trends, market size and share
Jvm-06-execution engine
[probably the most complete in Chinese] pushgateway entry notes
[attention mechanism] [first vit] Detr, end to end object detection with transformers the main components of the network are CNN and transformer
Global and Chinese market of optical fiber connectors 2022-2028: Research Report on technology, participants, trends, market size and share
Kubernetes will show you from beginning to end
SQL server安装位置改不了
视觉上位系统设计开发(halcon-winform)-2.全局变量设计
Jvm-05-object, direct memory, string constant pool
Nppexec get process return code
Summary of concurrent full knowledge points
Halcon与Winform学习第一节
The state does not change after the assignment of El switch
Final review points of human-computer interaction
Basic SQL tutorial
Global and Chinese market of transfer case 2022-2028: Research Report on technology, participants, trends, market size and share
Jvm-04-runtime data area heap, method area
Search in the two-dimensional array of leetcode sword offer (10)