ResultBean.cs
2.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;
namespace AOI
{
public class ResultBean
{
/// <summary>
///
/// </summary>
/// <param name="name">名称</param>
/// <param name="type">类型,1=mark点。2=斑点分析,3=颜色抽取,4=模板匹配,5=颜色匹配</param>
public ResultBean(string name,int type,double targetMinV,double targetMaxV)
{
this.MethodName = name;
this.MethodType = type;
this.targetMinValue = targetMinV;
this.targetMaxValue = targetMaxV;
}
/// <summary>
/// 名称
/// </summary>
public string MethodName;
/// <summary>
/// AOI标识
/// </summary>
public string labelKey;
/// <summary>
/// AOI检测结果,true表示OK, false表示NG
/// </summary>
public bool result = false;
/// <summary>
/// 标准区域图片
/// </summary>
public Image standardRoiImage;
/// <summary>
/// 当前区域图片
/// </summary>
public Image currentRoiImage;
public GraphicsPath roiPath;
public double targetMinValue;
public double targetMaxValue;
/// <summary>
/// 当为mark点和模板匹配时表示相似度。
/// 为颜色抽取表示像素占比
/// </summary>
public double percentValue;
/// <summary>
/// 类型,1=mark点。2=斑点分析,3=颜色抽取,4=模板匹配,5=颜色匹配
/// </summary>
public int MethodType = 0;
/// <summary>
/// 颜色抽取时表示List<CvBlob> blobList
/// </summary>
public object checkData;
public void Dispose()
{
if (standardRoiImage!=null)
{
standardRoiImage.Dispose();
}
if (currentRoiImage != null)
{
currentRoiImage.Dispose();
}
if (roiPath != null)
{
roiPath.Dispose();
}
}
}
}