RegionInfo.cs
1.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
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CameraVisionLib.Model
{
internal class RegionPlan
{
public string Name;
public List<RegionInfo> Info;
public Asa.Region.Feature feature;
public RegionPlan(string name, List<RegionInfo> info)
{
Name = name;
Info = info;
List<string> regionName = new();
List<RegionAPI.EyemRegion> regions = new();
for (int i = 0; i < info.Count; i++)
{
regionName.Add(info[i].Name);
regions.Add(info[i].Region);
}
feature = new(regionName, regions);
}
public RegionPlan(string name)
{
Name = name;
Info = new();
feature = null;
}
}
internal class RegionInfo
{
public string Name;
//public bool Exist;
public RegionAPI.EyemRegion Region;
public RegionInfo(string name, int x, int y, int w, int h, double r)
{
Name = name;
Region = new();
Region.X = x;
Region.Y = y;
Region.Width = w;
Region.Height = h;
Region.Ratio = r;
}
}
}