界面中处理
This commit is contained in:
@ -16,6 +16,7 @@
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="AntdUI" Version="1.8.9" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||
<PackageReference Include="OpenCvSharp4" Version="4.10.0.20241108" />
|
||||
<PackageReference Include="OpenCvSharp4.Extensions" Version="4.10.0.20241108" />
|
||||
|
@ -5,6 +5,7 @@ using static OpenCvSharp.AgastFeatureDetector;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Text;
|
||||
using System.Drawing.Design;
|
||||
using AntdUI;
|
||||
|
||||
namespace DH.Devices.Vision
|
||||
{
|
||||
@ -255,24 +256,33 @@ namespace DH.Devices.Vision
|
||||
}
|
||||
|
||||
}
|
||||
public class RelatedCamera
|
||||
public class RelatedCamera : NotifyProperty
|
||||
{
|
||||
|
||||
private string _cameraSourceId = "";
|
||||
[Category("关联相机")]
|
||||
[DisplayName("关联相机")]
|
||||
[Description("关联相机描述")]
|
||||
|
||||
[DisplayName("相机源ID")]
|
||||
[Description("关联相机的唯一标识符")]
|
||||
//[TypeConverter(typeof(CollectionCountConvert))]
|
||||
public string CameraSourceId { get; set; } = "";
|
||||
public string CameraSourceId
|
||||
{
|
||||
get { return _cameraSourceId; }
|
||||
set
|
||||
{
|
||||
if (_cameraSourceId == value) return;
|
||||
_cameraSourceId = value;
|
||||
OnPropertyChanged(nameof(CameraSourceId));
|
||||
}
|
||||
}
|
||||
|
||||
public RelatedCamera()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// 可选:添加带 Selected 的构造函数
|
||||
public RelatedCamera(string cameraSourceId)
|
||||
{
|
||||
CameraSourceId = cameraSourceId;
|
||||
|
||||
}
|
||||
}
|
||||
public class DetectionConfig
|
||||
@ -299,6 +309,8 @@ namespace DH.Devices.Vision
|
||||
[Description("关联相机描述")]
|
||||
//[TypeConverter(typeof(DeviceIdSelectorConverter<CameraBase>))]
|
||||
|
||||
|
||||
|
||||
public List<RelatedCamera> CameraCollects { get; set; } = new List<RelatedCamera>();
|
||||
|
||||
|
||||
@ -400,10 +412,15 @@ namespace DH.Devices.Vision
|
||||
|
||||
public List<DetectionFilter> DetectionFilterList { get; set; } = new List<DetectionFilter>();
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 标签集合
|
||||
/// </summary>
|
||||
public List<DetectionLable> DetectionLableList { get; set; } = new List<DetectionLable>();
|
||||
//[Category("深度学习配置")]
|
||||
//[DisplayName("检测配置标签")]
|
||||
//[Description("检测配置标签关联")]
|
||||
|
||||
|
||||
//public List<DetectConfigLabel> DetectConfigLabelList { get; set; } = new List<DetectConfigLabel>();
|
||||
|
||||
|
||||
@ -423,6 +440,184 @@ namespace DH.Devices.Vision
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
//大改预处理类
|
||||
/// <summary>
|
||||
/// 预处理
|
||||
/// </summary>
|
||||
public class PreTreatParam : NotifyProperty
|
||||
{
|
||||
|
||||
|
||||
private bool _selected = false;
|
||||
public bool Selected
|
||||
{
|
||||
get { return _selected; }
|
||||
set
|
||||
{
|
||||
if (_selected == value) return;
|
||||
_selected = value;
|
||||
OnPropertyChanged(nameof(Selected));
|
||||
}
|
||||
}
|
||||
private string _name;
|
||||
public string Name
|
||||
{
|
||||
get { return _name; }
|
||||
set
|
||||
{
|
||||
if (_name == value) return;
|
||||
_name = value;
|
||||
OnPropertyChanged(nameof(Name));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private string _value;
|
||||
public string Value
|
||||
{
|
||||
get { return _value; }
|
||||
set
|
||||
{
|
||||
if (_value == value) return;
|
||||
_value = value;
|
||||
OnPropertyChanged(nameof(Value));
|
||||
}
|
||||
}
|
||||
|
||||
private CellLink[] cellLinks;
|
||||
public CellLink[] CellLinks
|
||||
{
|
||||
get { return cellLinks; }
|
||||
set
|
||||
{
|
||||
if (cellLinks == value) return;
|
||||
cellLinks = value;
|
||||
OnPropertyChanged(nameof(CellLinks));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public class DetectionLable : NotifyProperty
|
||||
{
|
||||
private bool _selected = false;
|
||||
private string _labelId;
|
||||
private string _labelName;
|
||||
private double _maxSource;
|
||||
private double _minSource;
|
||||
private double _maxArea;
|
||||
private double _minArea;
|
||||
private ResultState _resultState = ResultState.ResultTBD;
|
||||
|
||||
|
||||
|
||||
|
||||
public bool Selected
|
||||
{
|
||||
get { return _selected; }
|
||||
set
|
||||
{
|
||||
if (_selected == value) return;
|
||||
_selected = value;
|
||||
OnPropertyChanged(nameof(Selected));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public string LabelId
|
||||
{
|
||||
get { return _labelId; }
|
||||
set
|
||||
{
|
||||
if (_labelId == value) return;
|
||||
_labelId = value;
|
||||
OnPropertyChanged(nameof(LabelId));
|
||||
}
|
||||
}
|
||||
|
||||
public string LabelName
|
||||
{
|
||||
get { return _labelName; }
|
||||
set
|
||||
{
|
||||
if (_labelName == value) return;
|
||||
_labelName = value;
|
||||
OnPropertyChanged(nameof(LabelName));
|
||||
}
|
||||
}
|
||||
|
||||
public double MaxSource
|
||||
{
|
||||
get { return _maxSource; }
|
||||
set
|
||||
{
|
||||
if (_maxSource.Equals(value)) return;
|
||||
_maxSource = value;
|
||||
OnPropertyChanged(nameof(MaxSource));
|
||||
}
|
||||
}
|
||||
|
||||
public double MinSource
|
||||
{
|
||||
get { return _minSource; }
|
||||
set
|
||||
{
|
||||
if (_minSource.Equals(value)) return;
|
||||
_minSource = value;
|
||||
OnPropertyChanged(nameof(MinSource));
|
||||
}
|
||||
}
|
||||
|
||||
public double MaxArea
|
||||
{
|
||||
get { return _maxArea; }
|
||||
set
|
||||
{
|
||||
if (_maxArea.Equals(value)) return;
|
||||
_maxArea = value;
|
||||
OnPropertyChanged(nameof(MaxArea));
|
||||
}
|
||||
}
|
||||
|
||||
public double MinArea
|
||||
{
|
||||
get { return _minArea; }
|
||||
set
|
||||
{
|
||||
if (_minArea.Equals(value)) return;
|
||||
_minArea = value;
|
||||
OnPropertyChanged(nameof(MinArea));
|
||||
}
|
||||
}
|
||||
|
||||
public ResultState ResultState
|
||||
{
|
||||
get { return _resultState; }
|
||||
set
|
||||
{
|
||||
if (_resultState == value) return;
|
||||
_resultState = value;
|
||||
OnPropertyChanged(nameof(ResultState));
|
||||
}
|
||||
}
|
||||
|
||||
private CellLink[] cellLinks;
|
||||
public CellLink[] CellLinks
|
||||
{
|
||||
get { return cellLinks; }
|
||||
set
|
||||
{
|
||||
if (cellLinks == value) return;
|
||||
cellLinks = value;
|
||||
OnPropertyChanged(nameof(CellLinks));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 识别目标定义 class:分类信息 Detection Segmentation:要识别的对象
|
||||
/// </summary>
|
||||
|
@ -1,10 +1,13 @@
|
||||
|
||||
using AntdUI;
|
||||
|
||||
using OpenCvSharp;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Xml.Linq;
|
||||
using static System.ComponentModel.Design.ObjectSelectorEditor;
|
||||
|
||||
namespace DH.Devices.Vision
|
||||
{
|
||||
@ -87,30 +90,8 @@ namespace DH.Devices.Vision
|
||||
}
|
||||
|
||||
}
|
||||
public class PreTreatParam
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 参数名称
|
||||
/// </summary>
|
||||
///
|
||||
[Category("预处理参数")]
|
||||
[DisplayName("参数名称")]
|
||||
[Description("参数名称")]
|
||||
public string Name { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 参数值
|
||||
/// </summary>
|
||||
///
|
||||
[Category("预处理参数")]
|
||||
[DisplayName("参数值")]
|
||||
[Description("参数值")]
|
||||
public string Value { get; set; }
|
||||
|
||||
|
||||
}
|
||||
|
||||
public static class MLGPUEngine
|
||||
{
|
||||
|
||||
|
Reference in New Issue
Block a user