Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
AccAOI
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit afe4a2a0
由
LN
编写于
2019-08-21 16:17:18 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
界面调整
1 个父辈
bb6a7e9a
显示空白字符变更
内嵌
并排
正在显示
20 个修改的文件
包含
218 行增加
和
82 行删除
AOI/ResultBean.cs
AOI/blob/AoiBlobMethod.cs
AOI/mark/AoiMarkMethod.cs
AOI/match/AoiTemplateMethod.cs
AOI/rgb/AoiMethodRgb.cs
AccAOI/AOIResourceCulture.cs
AccAOI/ControlUtil.cs
AccAOI/FrmAoiSetting.Designer.cs
AccAOI/FrmAoiSetting.cs
AccAOI/FrmMethodName.cs
AccAOI/Properties/en-US.resource
AccAOI/Properties/zh-CN.resource
AccAOI/control/ABaseControl.Designer.cs
AccAOI/control/AioMarkControl.Designer.cs
AccAOI/control/AioMarkControl.cs
AccAOI/control/AioTempMatchControl.Designer.cs
AccAOI/control/AioTempMatchControl.cs
dll/AOI.dll
dll/AccAOI.dll
dll/AccImageBox.dll
AOI/ResultBean.cs
查看文件 @
afe4a2a
...
@@ -10,9 +10,17 @@ namespace AOI
...
@@ -10,9 +10,17 @@ namespace AOI
{
{
public
class
ResultBean
public
class
ResultBean
{
{
public
ResultBean
(
string
name
)
/// <summary>
///
/// </summary>
/// <param name="name">名称</param>
/// <param name="type">类型,1=mark点。2=斑点分析,3=颜色抽取,4=模板匹配</param>
public
ResultBean
(
string
name
,
int
type
,
double
targetMinV
,
double
targetMaxV
)
{
{
this
.
MethodName
=
name
;
this
.
MethodName
=
name
;
this
.
MethodType
=
type
;
this
.
targetMinValue
=
targetMinV
;
this
.
targetMaxValue
=
targetMaxV
;
}
}
/// <summary>
/// <summary>
/// 名称
/// 名称
...
@@ -36,10 +44,25 @@ namespace AOI
...
@@ -36,10 +44,25 @@ namespace AOI
public
Image
currentRoiImage
;
public
Image
currentRoiImage
;
public
GraphicsPath
roiPath
;
public
GraphicsPath
roiPath
;
public
double
targetMinValue
;
public
double
targetMaxValue
;
/// <summary>
/// 当为mark点和模板匹配时表示相似度。
/// 为颜色抽取表示像素占比
/// </summary>
public
double
percentValue
;
/// <summary>
/// 类型,1=mark点。2=斑点分析,3=颜色抽取,4=模板匹配
/// </summary>
public
int
MethodType
=
0
;
/// <summary>
/// <summary>
///
实际相似度
///
颜色抽取时表示List<CvBlob> blobList
/// </summary>
/// </summary>
public
double
samePercent
;
public
object
checkData
;
}
}
}
}
AOI/blob/AoiBlobMethod.cs
查看文件 @
afe4a2a
...
@@ -43,7 +43,7 @@ namespace AOI
...
@@ -43,7 +43,7 @@ namespace AOI
public
override
ResultBean
Check
(
Image
standardImage
,
Image
imageToCheck
)
public
override
ResultBean
Check
(
Image
standardImage
,
Image
imageToCheck
)
{
{
ResultBean
resultBean
=
new
ResultBean
(
MethodName
);
ResultBean
resultBean
=
new
ResultBean
(
MethodName
,
2
,
minNum
,
maxNum
);
bool
needCut
=
true
;
bool
needCut
=
true
;
Image
standardRoiImg
=
GetRoiImage
(
standardImage
,
needCut
);
Image
standardRoiImg
=
GetRoiImage
(
standardImage
,
needCut
);
resultBean
.
standardRoiImage
=
standardRoiImg
;
resultBean
.
standardRoiImage
=
standardRoiImg
;
...
@@ -64,6 +64,7 @@ namespace AOI
...
@@ -64,6 +64,7 @@ namespace AOI
result
=
true
;
result
=
true
;
}
}
}
}
resultBean
.
checkData
=(
object
)
blobList
;
resultBean
.
result
=
result
;
resultBean
.
result
=
result
;
return
resultBean
;
return
resultBean
;
}
}
...
...
AOI/mark/AoiMarkMethod.cs
查看文件 @
afe4a2a
...
@@ -69,7 +69,7 @@ namespace AOI
...
@@ -69,7 +69,7 @@ namespace AOI
/// <returns></returns>
/// <returns></returns>
public
override
ResultBean
Check
(
Image
standardImage
,
Image
imageToCheck
)
public
override
ResultBean
Check
(
Image
standardImage
,
Image
imageToCheck
)
{
{
ResultBean
resultBean
=
new
ResultBean
(
MethodName
);
ResultBean
resultBean
=
new
ResultBean
(
MethodName
,
1
,
SamePercent
,
SamePercent
);
resultBean
.
standardRoiImage
=
standardImage
;
resultBean
.
standardRoiImage
=
standardImage
;
double
sameValue
=
0
;
double
sameValue
=
0
;
Image
resultImage
=
FixImage
(
standardImage
,
imageToCheck
,
out
sameValue
);
Image
resultImage
=
FixImage
(
standardImage
,
imageToCheck
,
out
sameValue
);
...
@@ -77,7 +77,7 @@ namespace AOI
...
@@ -77,7 +77,7 @@ namespace AOI
{
{
resultBean
.
result
=
true
;
resultBean
.
result
=
true
;
resultBean
.
currentRoiImage
=
resultImage
;
resultBean
.
currentRoiImage
=
resultImage
;
resultBean
.
samePercent
=
sameValue
;
resultBean
.
percentValue
=
sameValue
;
}
}
return
resultBean
;
return
resultBean
;
}
}
...
...
AOI/match/AoiTemplateMethod.cs
查看文件 @
afe4a2a
...
@@ -23,7 +23,8 @@ namespace AOI
...
@@ -23,7 +23,8 @@ namespace AOI
public
override
ResultBean
Check
(
Image
standardImage
,
Image
imageToCheck
)
public
override
ResultBean
Check
(
Image
standardImage
,
Image
imageToCheck
)
{
{
ResultBean
resultBean
=
new
ResultBean
(
MethodName
);
ResultBean
resultBean
=
new
ResultBean
(
MethodName
,
4
,
SamePercent
,
SamePercent
);
bool
needCut
=
true
;
bool
needCut
=
true
;
Image
standardRoiImg
=
GetRoiImage
(
standardImage
,
needCut
);
Image
standardRoiImg
=
GetRoiImage
(
standardImage
,
needCut
);
resultBean
.
standardRoiImage
=
standardRoiImg
;
resultBean
.
standardRoiImage
=
standardRoiImg
;
...
@@ -40,7 +41,7 @@ namespace AOI
...
@@ -40,7 +41,7 @@ namespace AOI
}
}
resultBean
.
currentRoiImage
=
cutImg
;
resultBean
.
currentRoiImage
=
cutImg
;
resultBean
.
result
=
result
;
resultBean
.
result
=
result
;
resultBean
.
samePercent
=
Math
.
Round
(
percent
,
3
);
resultBean
.
percentValue
=
Math
.
Round
(
percent
,
3
);
return
resultBean
;
return
resultBean
;
}
}
...
...
AOI/rgb/AoiMethodRgb.cs
查看文件 @
afe4a2a
...
@@ -40,7 +40,7 @@ namespace AOI
...
@@ -40,7 +40,7 @@ namespace AOI
public
override
ResultBean
Check
(
Image
standardImage
,
Image
imageToCheck
)
public
override
ResultBean
Check
(
Image
standardImage
,
Image
imageToCheck
)
{
{
ResultBean
resultBean
=
new
ResultBean
(
MethodName
);
ResultBean
resultBean
=
new
ResultBean
(
MethodName
,
3
,
minRate
,
maxRate
);
bool
needCut
=
true
;
bool
needCut
=
true
;
Image
standardRoiImg
=
GetRoiImage
(
standardImage
,
needCut
);
Image
standardRoiImg
=
GetRoiImage
(
standardImage
,
needCut
);
resultBean
.
standardRoiImage
=
standardRoiImg
;
resultBean
.
standardRoiImage
=
standardRoiImg
;
...
@@ -54,6 +54,7 @@ namespace AOI
...
@@ -54,6 +54,7 @@ namespace AOI
{
{
result
=
true
;
result
=
true
;
}
}
resultBean
.
percentValue
=
Math
.
Round
(
rate
,
3
);
resultBean
.
result
=
result
;
resultBean
.
result
=
result
;
return
resultBean
;
return
resultBean
;
}
}
...
...
AccAOI/AOIResourceCulture.cs
查看文件 @
afe4a2a
...
@@ -38,7 +38,7 @@ namespace AccAOI
...
@@ -38,7 +38,7 @@ namespace AccAOI
{
{
LoadData
();
LoadData
();
}
}
ControlType
.
Mark
=
AOIResourceCulture
.
GetValue
(
"
Mark点设置
"
);
ControlType
.
Mark
=
AOIResourceCulture
.
GetValue
(
"
图像校准点
"
);
ControlType
.
AOIBlob
=
AOIResourceCulture
.
GetValue
(
"斑点分析"
);
ControlType
.
AOIBlob
=
AOIResourceCulture
.
GetValue
(
"斑点分析"
);
ControlType
.
AOIRGB
=
AOIResourceCulture
.
GetValue
(
"颜色抽取"
);
ControlType
.
AOIRGB
=
AOIResourceCulture
.
GetValue
(
"颜色抽取"
);
ControlType
.
Match
=
AOIResourceCulture
.
GetValue
(
"模板匹配"
);
ControlType
.
Match
=
AOIResourceCulture
.
GetValue
(
"模板匹配"
);
...
...
AccAOI/ControlUtil.cs
查看文件 @
afe4a2a
...
@@ -59,9 +59,9 @@ namespace AccAOI
...
@@ -59,9 +59,9 @@ namespace AccAOI
public
class
ControlType
public
class
ControlType
{
{
/// <summary>
/// <summary>
///
Mark点设置
///
图像校准点
/// </summary>
/// </summary>
public
static
string
Mark
=
AOIResourceCulture
.
GetValue
(
"
Mark点设置
"
);
public
static
string
Mark
=
AOIResourceCulture
.
GetValue
(
"
图像校准点
"
);
/// <summary>
/// <summary>
/// 斑点分析
/// 斑点分析
/// </summary>
/// </summary>
...
...
AccAOI/FrmAoiSetting.Designer.cs
查看文件 @
afe4a2a
...
@@ -48,11 +48,16 @@ namespace AccAOI
...
@@ -48,11 +48,16 @@ namespace AccAOI
this
.
flatButton1
=
new
Asa
.
Theme
.
FlatButton
();
this
.
flatButton1
=
new
Asa
.
Theme
.
FlatButton
();
this
.
flatButton2
=
new
Asa
.
Theme
.
FlatButton
();
this
.
flatButton2
=
new
Asa
.
Theme
.
FlatButton
();
this
.
lblCurrImage
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
lblCurrImage
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
testImageBox1
=
new
Acc
.
ImageBox
.
AccImageBox
();
this
.
imageBox1
=
new
Acc
.
ImageBox
.
AccImageBox
();
this
.
btnUpdateName
=
new
Asa
.
Theme
.
FlatButton
();
this
.
btnUpdateName
=
new
Asa
.
Theme
.
FlatButton
();
this
.
btnLan
=
new
Asa
.
Theme
.
FlatButton
();
this
.
btnLan
=
new
Asa
.
Theme
.
FlatButton
();
this
.
flatLabel1
=
new
Asa
.
Theme
.
FlatLabel
();
this
.
flatLabel1
=
new
Asa
.
Theme
.
FlatLabel
();
this
.
panTest
=
new
System
.
Windows
.
Forms
.
Panel
();
this
.
panel1
=
new
System
.
Windows
.
Forms
.
Panel
();
this
.
lblTestResult
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
testImageBox1
=
new
Acc
.
ImageBox
.
AccImageBox
();
this
.
imageBox1
=
new
Acc
.
ImageBox
.
AccImageBox
();
this
.
panTest
.
SuspendLayout
();
this
.
panel1
.
SuspendLayout
();
this
.
SuspendLayout
();
this
.
SuspendLayout
();
//
//
// aoiList
// aoiList
...
@@ -61,10 +66,10 @@ namespace AccAOI
...
@@ -61,10 +66,10 @@ namespace AccAOI
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)));
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)));
this
.
aoiList
.
BackColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))));
this
.
aoiList
.
BackColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))));
this
.
aoiList
.
Inside
=
false
;
this
.
aoiList
.
Inside
=
false
;
this
.
aoiList
.
Location
=
new
System
.
Drawing
.
Point
(
7
,
1
42
);
this
.
aoiList
.
Location
=
new
System
.
Drawing
.
Point
(
7
,
1
77
);
this
.
aoiList
.
Name
=
"aoiList"
;
this
.
aoiList
.
Name
=
"aoiList"
;
this
.
aoiList
.
SelectedIndex
=
-
1
;
this
.
aoiList
.
SelectedIndex
=
-
1
;
this
.
aoiList
.
Size
=
new
System
.
Drawing
.
Size
(
275
,
4
91
);
this
.
aoiList
.
Size
=
new
System
.
Drawing
.
Size
(
275
,
4
56
);
this
.
aoiList
.
TabIndex
=
2
;
this
.
aoiList
.
TabIndex
=
2
;
this
.
aoiList
.
SelectedIndexChanged
+=
new
Asa
.
Theme
.
Event
.
SelectedIndexChanged
(
this
.
aoiList_IndexChanged
);
this
.
aoiList
.
SelectedIndexChanged
+=
new
Asa
.
Theme
.
Event
.
SelectedIndexChanged
(
this
.
aoiList_IndexChanged
);
//
//
...
@@ -76,7 +81,7 @@ namespace AccAOI
...
@@ -76,7 +81,7 @@ namespace AccAOI
this
.
btnOpenPro
.
Inside
=
false
;
this
.
btnOpenPro
.
Inside
=
false
;
this
.
btnOpenPro
.
Location
=
new
System
.
Drawing
.
Point
(
7
,
33
);
this
.
btnOpenPro
.
Location
=
new
System
.
Drawing
.
Point
(
7
,
33
);
this
.
btnOpenPro
.
Name
=
"btnOpenPro"
;
this
.
btnOpenPro
.
Name
=
"btnOpenPro"
;
this
.
btnOpenPro
.
Size
=
new
System
.
Drawing
.
Size
(
13
7
,
30
);
this
.
btnOpenPro
.
Size
=
new
System
.
Drawing
.
Size
(
13
5
,
30
);
this
.
btnOpenPro
.
StateColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))));
this
.
btnOpenPro
.
StateColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))));
this
.
btnOpenPro
.
TabIndex
=
6
;
this
.
btnOpenPro
.
TabIndex
=
6
;
this
.
btnOpenPro
.
Text
=
"打开项目"
;
this
.
btnOpenPro
.
Text
=
"打开项目"
;
...
@@ -88,9 +93,9 @@ namespace AccAOI
...
@@ -88,9 +93,9 @@ namespace AccAOI
this
.
btnSavePro
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnSavePro
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnSavePro
.
ImageSize
=
new
System
.
Drawing
.
Size
(
0
,
0
);
this
.
btnSavePro
.
ImageSize
=
new
System
.
Drawing
.
Size
(
0
,
0
);
this
.
btnSavePro
.
Inside
=
false
;
this
.
btnSavePro
.
Inside
=
false
;
this
.
btnSavePro
.
Location
=
new
System
.
Drawing
.
Point
(
14
5
,
33
);
this
.
btnSavePro
.
Location
=
new
System
.
Drawing
.
Point
(
14
6
,
33
);
this
.
btnSavePro
.
Name
=
"btnSavePro"
;
this
.
btnSavePro
.
Name
=
"btnSavePro"
;
this
.
btnSavePro
.
Size
=
new
System
.
Drawing
.
Size
(
13
7
,
30
);
this
.
btnSavePro
.
Size
=
new
System
.
Drawing
.
Size
(
13
5
,
30
);
this
.
btnSavePro
.
StateColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))));
this
.
btnSavePro
.
StateColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))));
this
.
btnSavePro
.
TabIndex
=
7
;
this
.
btnSavePro
.
TabIndex
=
7
;
this
.
btnSavePro
.
Text
=
"保存项目"
;
this
.
btnSavePro
.
Text
=
"保存项目"
;
...
@@ -102,9 +107,9 @@ namespace AccAOI
...
@@ -102,9 +107,9 @@ namespace AccAOI
this
.
btnNewAoi
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnNewAoi
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnNewAoi
.
ImageSize
=
new
System
.
Drawing
.
Size
(
0
,
0
);
this
.
btnNewAoi
.
ImageSize
=
new
System
.
Drawing
.
Size
(
0
,
0
);
this
.
btnNewAoi
.
Inside
=
false
;
this
.
btnNewAoi
.
Inside
=
false
;
this
.
btnNewAoi
.
Location
=
new
System
.
Drawing
.
Point
(
14
5
,
69
);
this
.
btnNewAoi
.
Location
=
new
System
.
Drawing
.
Point
(
14
6
,
105
);
this
.
btnNewAoi
.
Name
=
"btnNewAoi"
;
this
.
btnNewAoi
.
Name
=
"btnNewAoi"
;
this
.
btnNewAoi
.
Size
=
new
System
.
Drawing
.
Size
(
13
7
,
30
);
this
.
btnNewAoi
.
Size
=
new
System
.
Drawing
.
Size
(
13
5
,
30
);
this
.
btnNewAoi
.
StateColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))));
this
.
btnNewAoi
.
StateColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))));
this
.
btnNewAoi
.
TabIndex
=
8
;
this
.
btnNewAoi
.
TabIndex
=
8
;
this
.
btnNewAoi
.
Text
=
"新增"
;
this
.
btnNewAoi
.
Text
=
"新增"
;
...
@@ -157,7 +162,7 @@ namespace AccAOI
...
@@ -157,7 +162,7 @@ namespace AccAOI
this
.
comType
.
Location
=
new
System
.
Drawing
.
Point
(
7
,
69
);
this
.
comType
.
Location
=
new
System
.
Drawing
.
Point
(
7
,
69
);
this
.
comType
.
Name
=
"comType"
;
this
.
comType
.
Name
=
"comType"
;
this
.
comType
.
SelectedIndex
=
0
;
this
.
comType
.
SelectedIndex
=
0
;
this
.
comType
.
Size
=
new
System
.
Drawing
.
Size
(
137
,
30
);
this
.
comType
.
Size
=
new
System
.
Drawing
.
Size
(
274
,
30
);
this
.
comType
.
TabIndex
=
14
;
this
.
comType
.
TabIndex
=
14
;
//
//
// panAoi
// panAoi
...
@@ -190,9 +195,9 @@ namespace AccAOI
...
@@ -190,9 +195,9 @@ namespace AccAOI
this
.
btnDel
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnDel
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnDel
.
ImageSize
=
new
System
.
Drawing
.
Size
(
0
,
0
);
this
.
btnDel
.
ImageSize
=
new
System
.
Drawing
.
Size
(
0
,
0
);
this
.
btnDel
.
Inside
=
false
;
this
.
btnDel
.
Inside
=
false
;
this
.
btnDel
.
Location
=
new
System
.
Drawing
.
Point
(
7
,
1
05
);
this
.
btnDel
.
Location
=
new
System
.
Drawing
.
Point
(
7
,
1
41
);
this
.
btnDel
.
Name
=
"btnDel"
;
this
.
btnDel
.
Name
=
"btnDel"
;
this
.
btnDel
.
Size
=
new
System
.
Drawing
.
Size
(
13
7
,
30
);
this
.
btnDel
.
Size
=
new
System
.
Drawing
.
Size
(
13
5
,
30
);
this
.
btnDel
.
StateColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))));
this
.
btnDel
.
StateColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))));
this
.
btnDel
.
TabIndex
=
17
;
this
.
btnDel
.
TabIndex
=
17
;
this
.
btnDel
.
Text
=
"删除"
;
this
.
btnDel
.
Text
=
"删除"
;
...
@@ -253,43 +258,15 @@ namespace AccAOI
...
@@ -253,43 +258,15 @@ namespace AccAOI
this
.
lblCurrImage
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleCenter
;
this
.
lblCurrImage
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleCenter
;
this
.
lblCurrImage
.
Click
+=
new
System
.
EventHandler
(
this
.
lblCurrImage_Click
);
this
.
lblCurrImage
.
Click
+=
new
System
.
EventHandler
(
this
.
lblCurrImage_Click
);
//
//
// testImageBox1
//
this
.
testImageBox1
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
)
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
testImageBox1
.
BackColor
=
System
.
Drawing
.
Color
.
Silver
;
this
.
testImageBox1
.
DragHandleSize
=
9
;
this
.
testImageBox1
.
Location
=
new
System
.
Drawing
.
Point
(
668
,
245
);
this
.
testImageBox1
.
Name
=
"testImageBox1"
;
this
.
testImageBox1
.
SelectionColor
=
System
.
Drawing
.
Color
.
Blue
;
this
.
testImageBox1
.
Size
=
new
System
.
Drawing
.
Size
(
542
,
270
);
this
.
testImageBox1
.
TabIndex
=
21
;
this
.
testImageBox1
.
Visible
=
false
;
//
// imageBox1
//
this
.
imageBox1
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
)
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
imageBox1
.
DragHandleSize
=
9
;
this
.
imageBox1
.
Location
=
new
System
.
Drawing
.
Point
(
610
,
140
);
this
.
imageBox1
.
Name
=
"imageBox1"
;
this
.
imageBox1
.
SelectionColor
=
System
.
Drawing
.
Color
.
Blue
;
this
.
imageBox1
.
SelectionMode
=
Acc
.
ImageBox
.
ImageBoxSelectionMode
.
Rectangle
;
this
.
imageBox1
.
Size
=
new
System
.
Drawing
.
Size
(
635
,
493
);
this
.
imageBox1
.
TabIndex
=
4
;
this
.
imageBox1
.
SelectionRegionChanged
+=
new
System
.
EventHandler
(
this
.
imageBox1_SelectionRegionChanged
);
//
// btnUpdateName
// btnUpdateName
//
//
this
.
btnUpdateName
.
BackColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))));
this
.
btnUpdateName
.
BackColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))));
this
.
btnUpdateName
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnUpdateName
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnUpdateName
.
ImageSize
=
new
System
.
Drawing
.
Size
(
0
,
0
);
this
.
btnUpdateName
.
ImageSize
=
new
System
.
Drawing
.
Size
(
0
,
0
);
this
.
btnUpdateName
.
Inside
=
false
;
this
.
btnUpdateName
.
Inside
=
false
;
this
.
btnUpdateName
.
Location
=
new
System
.
Drawing
.
Point
(
14
5
,
105
);
this
.
btnUpdateName
.
Location
=
new
System
.
Drawing
.
Point
(
14
6
,
141
);
this
.
btnUpdateName
.
Name
=
"btnUpdateName"
;
this
.
btnUpdateName
.
Name
=
"btnUpdateName"
;
this
.
btnUpdateName
.
Size
=
new
System
.
Drawing
.
Size
(
13
7
,
30
);
this
.
btnUpdateName
.
Size
=
new
System
.
Drawing
.
Size
(
13
5
,
30
);
this
.
btnUpdateName
.
StateColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))));
this
.
btnUpdateName
.
StateColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))));
this
.
btnUpdateName
.
TabIndex
=
23
;
this
.
btnUpdateName
.
TabIndex
=
23
;
this
.
btnUpdateName
.
Text
=
"修改"
;
this
.
btnUpdateName
.
Text
=
"修改"
;
...
@@ -321,14 +298,72 @@ namespace AccAOI
...
@@ -321,14 +298,72 @@ namespace AccAOI
this
.
flatLabel1
.
Text
=
"相机:"
;
this
.
flatLabel1
.
Text
=
"相机:"
;
this
.
flatLabel1
.
Visible
=
false
;
this
.
flatLabel1
.
Visible
=
false
;
//
//
// panTest
//
this
.
panTest
.
Controls
.
Add
(
this
.
panel1
);
this
.
panTest
.
Controls
.
Add
(
this
.
testImageBox1
);
this
.
panTest
.
Location
=
new
System
.
Drawing
.
Point
(
616
,
142
);
this
.
panTest
.
Name
=
"panTest"
;
this
.
panTest
.
Size
=
new
System
.
Drawing
.
Size
(
508
,
432
);
this
.
panTest
.
TabIndex
=
25
;
//
// panel1
//
this
.
panel1
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)(((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
)
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
panel1
.
AutoScroll
=
true
;
this
.
panel1
.
Controls
.
Add
(
this
.
lblTestResult
);
this
.
panel1
.
Location
=
new
System
.
Drawing
.
Point
(
232
,
3
);
this
.
panel1
.
Name
=
"panel1"
;
this
.
panel1
.
Size
=
new
System
.
Drawing
.
Size
(
273
,
425
);
this
.
panel1
.
TabIndex
=
22
;
//
// lblTestResult
//
this
.
lblTestResult
.
AutoSize
=
true
;
this
.
lblTestResult
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
lblTestResult
.
ForeColor
=
System
.
Drawing
.
Color
.
White
;
this
.
lblTestResult
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
5
);
this
.
lblTestResult
.
Name
=
"lblTestResult"
;
this
.
lblTestResult
.
Size
=
new
System
.
Drawing
.
Size
(
53
,
17
);
this
.
lblTestResult
.
TabIndex
=
22
;
this
.
lblTestResult
.
Text
=
"Result ?"
;
//
// testImageBox1
//
this
.
testImageBox1
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
)
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
testImageBox1
.
BackColor
=
System
.
Drawing
.
Color
.
Silver
;
this
.
testImageBox1
.
DragHandleSize
=
9
;
this
.
testImageBox1
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
0
);
this
.
testImageBox1
.
Name
=
"testImageBox1"
;
this
.
testImageBox1
.
SelectionColor
=
System
.
Drawing
.
Color
.
Blue
;
this
.
testImageBox1
.
Size
=
new
System
.
Drawing
.
Size
(
228
,
431
);
this
.
testImageBox1
.
TabIndex
=
21
;
//
// imageBox1
//
this
.
imageBox1
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
)
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
imageBox1
.
DragHandleSize
=
9
;
this
.
imageBox1
.
Location
=
new
System
.
Drawing
.
Point
(
610
,
140
);
this
.
imageBox1
.
Name
=
"imageBox1"
;
this
.
imageBox1
.
SelectionColor
=
System
.
Drawing
.
Color
.
Blue
;
this
.
imageBox1
.
SelectionMode
=
Acc
.
ImageBox
.
ImageBoxSelectionMode
.
Rectangle
;
this
.
imageBox1
.
Size
=
new
System
.
Drawing
.
Size
(
653
,
493
);
this
.
imageBox1
.
TabIndex
=
4
;
this
.
imageBox1
.
SelectionRegionChanged
+=
new
System
.
EventHandler
(
this
.
imageBox1_SelectionRegionChanged
);
//
// FrmAoiSetting
// FrmAoiSetting
//
//
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
None
;
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
None
;
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
1252
,
641
);
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
1270
,
641
);
this
.
Controls
.
Add
(
this
.
panTest
);
this
.
Controls
.
Add
(
this
.
btnLan
);
this
.
Controls
.
Add
(
this
.
btnLan
);
this
.
Controls
.
Add
(
this
.
btnUpdateName
);
this
.
Controls
.
Add
(
this
.
btnUpdateName
);
this
.
Controls
.
Add
(
this
.
lblCurrImage
);
this
.
Controls
.
Add
(
this
.
lblCurrImage
);
this
.
Controls
.
Add
(
this
.
testImageBox1
);
this
.
Controls
.
Add
(
this
.
flatButton1
);
this
.
Controls
.
Add
(
this
.
flatButton1
);
this
.
Controls
.
Add
(
this
.
flatButton2
);
this
.
Controls
.
Add
(
this
.
flatButton2
);
this
.
Controls
.
Add
(
this
.
btnImageChange
);
this
.
Controls
.
Add
(
this
.
btnImageChange
);
...
@@ -350,6 +385,9 @@ namespace AccAOI
...
@@ -350,6 +385,9 @@ namespace AccAOI
this
.
Text
=
"AOI"
;
this
.
Text
=
"AOI"
;
this
.
Load
+=
new
System
.
EventHandler
(
this
.
FrmAoiSetting_Load
);
this
.
Load
+=
new
System
.
EventHandler
(
this
.
FrmAoiSetting_Load
);
this
.
Shown
+=
new
System
.
EventHandler
(
this
.
FrmAoiSetting_Shown
);
this
.
Shown
+=
new
System
.
EventHandler
(
this
.
FrmAoiSetting_Shown
);
this
.
panTest
.
ResumeLayout
(
false
);
this
.
panel1
.
ResumeLayout
(
false
);
this
.
panel1
.
PerformLayout
();
this
.
ResumeLayout
(
false
);
this
.
ResumeLayout
(
false
);
this
.
PerformLayout
();
this
.
PerformLayout
();
...
@@ -377,5 +415,8 @@ namespace AccAOI
...
@@ -377,5 +415,8 @@ namespace AccAOI
private
Asa
.
Theme
.
FlatButton
btnUpdateName
;
private
Asa
.
Theme
.
FlatButton
btnUpdateName
;
private
Asa
.
Theme
.
FlatButton
btnLan
;
private
Asa
.
Theme
.
FlatButton
btnLan
;
private
Asa
.
Theme
.
FlatLabel
flatLabel1
;
private
Asa
.
Theme
.
FlatLabel
flatLabel1
;
private
System
.
Windows
.
Forms
.
Panel
panTest
;
private
System
.
Windows
.
Forms
.
Label
lblTestResult
;
private
System
.
Windows
.
Forms
.
Panel
panel1
;
}
}
}
}
\ No newline at end of file
\ No newline at end of file
AccAOI/FrmAoiSetting.cs
查看文件 @
afe4a2a
using
AccAOI.camera
;
using
AccAOI.camera
;
using
AOI
;
using
AOI
;
using
OpenCvSharp.Blob
;
using
System
;
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.ComponentModel
;
using
System.ComponentModel
;
...
@@ -490,17 +491,66 @@ namespace AccAOI
...
@@ -490,17 +491,66 @@ namespace AccAOI
List
<
ResultBean
>
result
=
Project
.
CheckAll
(
TestImage
,
out
outImage
);
List
<
ResultBean
>
result
=
Project
.
CheckAll
(
TestImage
,
out
outImage
);
if
(
outImage
!=
null
)
if
(
outImage
!=
null
)
{
{
if
(!
this
.
testImageBox1
.
Visible
)
if
(!
this
.
panTest
.
Visible
)
{
{
btnImageChange_Click
(
null
,
null
);
btnImageChange_Click
(
null
,
null
);
}
}
this
.
testImageBox1
.
SelectNone
();
this
.
testImageBox1
.
SelectNone
();
this
.
testImageBox1
.
Image
=
outImage
;
this
.
testImageBox1
.
Image
=
outImage
;
}
}
if
(
result
==
null
)
{
lblTestResult
.
Text
=
"Result: null"
;
}
else
{
lblTestResult
.
Text
=
GetResultsStr
(
result
);
}
GC
.
Collect
();
GC
.
Collect
();
CanSel
=
true
;
CanSel
=
true
;
}
}
public
static
string
GetResultsStr
(
List
<
ResultBean
>
result
)
{
string
msg
=
""
;
bool
isOk
=
true
;
foreach
(
ResultBean
bean
in
result
)
{
if
(
bean
.
MethodType
.
Equals
(
2
))
{
msg
+=
(
bean
.
result
?
"✔ "
:
"✘ "
)
+
bean
.
MethodName
+
"\r\n"
;
if
(
bean
.
checkData
!=
null
)
{
List
<
CvBlob
>
list
=
(
List
<
CvBlob
>)
bean
.
checkData
;
list
=
(
from
m
in
list
orderby
m
.
Area
descending
select
m
).
ToList
<
CvBlob
>();
string
text
=
" "
+
AOIResourceCulture
.
GetValue
(
"编号"
).
PadLeft
(
5
,
' '
)
+
AOIResourceCulture
.
GetValue
(
"面积↓"
).
PadLeft
(
8
,
' '
)
+
AOIResourceCulture
.
GetValue
(
"X坐标"
).
PadLeft
(
10
,
' '
)
+
AOIResourceCulture
.
GetValue
(
"Y坐标"
).
PadLeft
(
10
,
' '
);
int
index
=
1
;
foreach
(
CvBlob
cv
in
list
)
{
text
+=
"\r\n"
+
" "
+
index
.
ToString
().
PadLeft
(
5
,
' '
)
+
cv
.
Area
.
ToString
().
PadLeft
(
12
,
' '
)
+
Math
.
Round
(
cv
.
Centroid
.
X
,
2
).
ToString
().
PadLeft
(
12
,
' '
)
+
Math
.
Round
(
cv
.
Centroid
.
Y
,
2
).
ToString
().
PadLeft
(
12
,
' '
);
index
++;
}
msg
+=
text
+
"\r\n"
;
}
}
else
if
(
bean
.
MethodType
.
Equals
(
1
)
||
bean
.
MethodType
.
Equals
(
4
))
{
msg
+=
(
bean
.
result
?
"✔ "
:
"✘ "
)
+
bean
.
MethodName
+
" ("
+
bean
.
targetMinValue
+
"/"
+
bean
.
percentValue
+
"%)"
+
"\r\n"
;
}
else
{
msg
+=
(
bean
.
result
?
"✔ "
:
"✘ "
)
+
bean
.
MethodName
+
"\r\n"
;
msg
+=
" "
+
AOIResourceCulture
.
GetValue
(
"实际值"
)+
":"
+
bean
.
percentValue
+
" "
+
AOIResourceCulture
.
GetValue
(
"目标范围"
)+
":["
+
bean
.
targetMinValue
+
" , "
+
bean
.
targetMaxValue
+
"] \r\n"
;
}
if
(!
bean
.
result
)
{
isOk
=
false
;
}
}
return
"Result: "
+
(
isOk
?
"OK"
:
"NG"
)
+
"\r\n"
+
msg
;
}
private
void
btnDel_Click
(
object
sender
,
EventArgs
e
)
private
void
btnDel_Click
(
object
sender
,
EventArgs
e
)
{
{
if
(
BaseImg
==
null
)
if
(
BaseImg
==
null
)
...
@@ -527,9 +577,9 @@ namespace AccAOI
...
@@ -527,9 +577,9 @@ namespace AccAOI
private
void
btnImageChange_Click
(
object
sender
,
EventArgs
e
)
private
void
btnImageChange_Click
(
object
sender
,
EventArgs
e
)
{
{
if
(
testImageBox1
.
Visible
)
if
(
panTest
.
Visible
)
{
{
testImageBox1
.
Visible
=
false
;
panTest
.
Visible
=
false
;
imageBox1
.
Visible
=
true
;
imageBox1
.
Visible
=
true
;
btnImageChange
.
Text
=
AOIResourceCulture
.
GetValue
(
"显示测试图片"
);
btnImageChange
.
Text
=
AOIResourceCulture
.
GetValue
(
"显示测试图片"
);
lblCurrImage
.
Text
=
AOIResourceCulture
.
GetValue
(
"基准图:"
);
lblCurrImage
.
Text
=
AOIResourceCulture
.
GetValue
(
"基准图:"
);
...
@@ -537,11 +587,11 @@ namespace AccAOI
...
@@ -537,11 +587,11 @@ namespace AccAOI
}
}
else
else
{
{
testImageBox1
.
Visible
=
true
;
panTest
.
Visible
=
true
;
imageBox1
.
Visible
=
false
;
imageBox1
.
Visible
=
false
;
btnImageChange
.
Text
=
AOIResourceCulture
.
GetValue
(
"显示基准图片"
);
btnImageChange
.
Text
=
AOIResourceCulture
.
GetValue
(
"显示基准图片"
);
lblCurrImage
.
Text
=
AOIResourceCulture
.
GetValue
(
"测试/效果图:"
);
lblCurrImage
.
Text
=
AOIResourceCulture
.
GetValue
(
"测试/效果图:"
);
lblCurrImage
.
ForeColor
=
Color
.
Orang
e
;
lblCurrImage
.
ForeColor
=
Color
.
DodgerBlu
e
;
}
}
}
}
...
@@ -566,7 +616,7 @@ namespace AccAOI
...
@@ -566,7 +616,7 @@ namespace AccAOI
TestImage
=
new
Bitmap
(
file
);
TestImage
=
new
Bitmap
(
file
);
file
.
Dispose
();
file
.
Dispose
();
testImageBox1
.
Image
=
TestImage
;
testImageBox1
.
Image
=
TestImage
;
if
(
testImageBox1
.
Visible
.
Equals
(
false
))
if
(
panTest
.
Visible
.
Equals
(
false
))
{
{
btnImageChange_Click
(
null
,
null
);
btnImageChange_Click
(
null
,
null
);
}
}
...
@@ -574,9 +624,9 @@ namespace AccAOI
...
@@ -574,9 +624,9 @@ namespace AccAOI
private
void
FrmAoiSetting_Shown
(
object
sender
,
EventArgs
e
)
private
void
FrmAoiSetting_Shown
(
object
sender
,
EventArgs
e
)
{
{
testImageBox1
.
Size
=
imageBox1
.
Size
;
panTest
.
Size
=
imageBox1
.
Size
;
testImageBox1
.
Location
=
imageBox1
.
Location
;
panTest
.
Location
=
imageBox1
.
Location
;
testImageBox1
.
Visible
=
false
;
panTest
.
Visible
=
false
;
}
}
...
@@ -615,7 +665,7 @@ namespace AccAOI
...
@@ -615,7 +665,7 @@ namespace AccAOI
//读取图片内容
//读取图片内容
testImageBox1
.
Image
=
TestImage
;
testImageBox1
.
Image
=
TestImage
;
if
(
testImageBox1
.
Visible
.
Equals
(
false
))
if
(
panTest
.
Visible
.
Equals
(
false
))
{
{
btnImageChange_Click
(
null
,
null
);
btnImageChange_Click
(
null
,
null
);
}
}
...
@@ -676,7 +726,7 @@ namespace AccAOI
...
@@ -676,7 +726,7 @@ namespace AccAOI
try
try
{
{
Image
needSaveImage
=
null
;
Image
needSaveImage
=
null
;
if
(
testImageBox1
.
Visible
)
if
(
panTest
.
Visible
)
{
{
needSaveImage
=
testImageBox1
.
Image
;
needSaveImage
=
testImageBox1
.
Image
;
}
}
...
...
AccAOI/FrmMethodName.cs
查看文件 @
afe4a2a
...
@@ -24,6 +24,7 @@ namespace AccAOI
...
@@ -24,6 +24,7 @@ namespace AccAOI
private
void
FrmMethodName_Load
(
object
sender
,
EventArgs
e
)
private
void
FrmMethodName_Load
(
object
sender
,
EventArgs
e
)
{
{
txtName
.
Text
=
MethodName
;
txtName
.
Text
=
MethodName
;
}
}
...
@@ -36,7 +37,14 @@ namespace AccAOI
...
@@ -36,7 +37,14 @@ namespace AccAOI
private
void
btnOk_Click
(
object
sender
,
EventArgs
e
)
private
void
btnOk_Click
(
object
sender
,
EventArgs
e
)
{
{
string
newName
=
txtName
.
Text
;
string
newName
=
txtName
.
Text
.
Trim
();
if
(
newName
.
Length
>
30
||
newName
.
Length
<
2
)
{
MyMessage
.
Show
(
" 请输入正确名称(长度 2~30)"
,
newName
);
txtName
.
Focus
();
return
;
}
if
(
AllNameList
.
Contains
(
newName
))
if
(
AllNameList
.
Contains
(
newName
))
{
{
MyMessage
.
Show
(
"名称【{0}】已存在,请重新输入"
,
newName
);
MyMessage
.
Show
(
"名称【{0}】已存在,请重新输入"
,
newName
);
...
...
AccAOI/Properties/en-US.resource
查看文件 @
afe4a2a
...
@@ -72,7 +72,7 @@ AioTempMatchControl_btnSetArea_Text=ellipse
...
@@ -72,7 +72,7 @@ AioTempMatchControl_btnSetArea_Text=ellipse
AoiBlobControl_lblList_Text=Area of a list:
AoiBlobControl_lblList_Text=Area of a list:
AoiBlobControl_btnImgType_Text=original
AoiBlobControl_btnImgType_Text=original
AoiBlobControl_btnSetArea_Text=ellipse
AoiBlobControl_btnSetArea_Text=ellipse
Mark点设置=Mark Point Se
t
图像校准点=Image calibration poin
t
斑点分析=Spot analysis
斑点分析=Spot analysis
颜色抽取=Color extraction
颜色抽取=Color extraction
模板匹配=Template matching
模板匹配=Template matching
...
@@ -110,3 +110,6 @@ FrmMethodName_btnCancel_Text=Cancel
...
@@ -110,3 +110,6 @@ FrmMethodName_btnCancel_Text=Cancel
结果判断=result judgment
结果判断=result judgment
中文=Chinese
中文=Chinese
英文=English
英文=English
请输入正确名称(长度 2~30)=Please enter the correct name (length 2~30)
目标范围=Target
实际值= actual
\ No newline at end of file
\ No newline at end of file
AccAOI/Properties/zh-CN.resource
查看文件 @
afe4a2a
...
@@ -17,7 +17,7 @@ AioMarkControl_panResult_Text=结果判断
...
@@ -17,7 +17,7 @@ AioMarkControl_panResult_Text=结果判断
AioMarkControl_panParam_Text=参数设置
AioMarkControl_panParam_Text=参数设置
AioMarkControl_panAreaSet_Text=区域设置-矩形
AioMarkControl_panAreaSet_Text=区域设置-矩形
AioMarkControl_panAreaImage_Text=区域图片
AioMarkControl_panAreaImage_Text=区域图片
AioMarkControl_panControl_Text=00_
Mark点设置
AioMarkControl_panControl_Text=00_
图像校准点
AoiRgbControl_btnUpdate_Text=更新
AoiRgbControl_btnUpdate_Text=更新
AoiRgbControl_flatLabel9_Text=像素实时占比:
AoiRgbControl_flatLabel9_Text=像素实时占比:
AoiRgbControl_flatLabel2_Text=MinR:
AoiRgbControl_flatLabel2_Text=MinR:
...
@@ -72,7 +72,7 @@ AioTempMatchControl_btnSetArea_Text=椭圆
...
@@ -72,7 +72,7 @@ AioTempMatchControl_btnSetArea_Text=椭圆
AoiBlobControl_lblList_Text=面积列表:
AoiBlobControl_lblList_Text=面积列表:
AoiBlobControl_btnImgType_Text=原图
AoiBlobControl_btnImgType_Text=原图
AoiBlobControl_btnSetArea_Text=椭圆
AoiBlobControl_btnSetArea_Text=椭圆
Mark点设置=Mark点设置
图像校准点=图像校准点
斑点分析=斑点分析
斑点分析=斑点分析
颜色抽取=颜色抽取
颜色抽取=颜色抽取
模板匹配=模板匹配
模板匹配=模板匹配
...
@@ -110,3 +110,6 @@ FrmMethodName_btnCancel_Text=取消
...
@@ -110,3 +110,6 @@ FrmMethodName_btnCancel_Text=取消
结果判断=结果判断
结果判断=结果判断
中文=中文
中文=中文
英文=英文
英文=英文
请输入正确名称(长度 2~30)=请输入正确名称(长度 2~30)
目标范围=目标范围
实际值= 实际值
\ No newline at end of file
\ No newline at end of file
AccAOI/control/ABaseControl.Designer.cs
查看文件 @
afe4a2a
...
@@ -56,6 +56,7 @@ namespace AccAOI.control
...
@@ -56,6 +56,7 @@ namespace AccAOI.control
this
.
btnSetArea
.
StateColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))));
this
.
btnSetArea
.
StateColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))));
this
.
btnSetArea
.
TabIndex
=
7
;
this
.
btnSetArea
.
TabIndex
=
7
;
this
.
btnSetArea
.
Text
=
"椭圆"
;
this
.
btnSetArea
.
Text
=
"椭圆"
;
this
.
btnSetArea
.
Visible
=
false
;
this
.
btnSetArea
.
Click
+=
new
System
.
EventHandler
(
this
.
btnSetArea_Click
);
this
.
btnSetArea
.
Click
+=
new
System
.
EventHandler
(
this
.
btnSetArea_Click
);
//
//
// btnClearArea
// btnClearArea
...
@@ -64,9 +65,9 @@ namespace AccAOI.control
...
@@ -64,9 +65,9 @@ namespace AccAOI.control
this
.
btnClearArea
.
Font
=
new
System
.
Drawing
.
Font
(
"宋体"
,
9F
);
this
.
btnClearArea
.
Font
=
new
System
.
Drawing
.
Font
(
"宋体"
,
9F
);
this
.
btnClearArea
.
ImageSize
=
new
System
.
Drawing
.
Size
(
0
,
0
);
this
.
btnClearArea
.
ImageSize
=
new
System
.
Drawing
.
Size
(
0
,
0
);
this
.
btnClearArea
.
Inside
=
false
;
this
.
btnClearArea
.
Inside
=
false
;
this
.
btnClearArea
.
Location
=
new
System
.
Drawing
.
Point
(
212
,
274
);
this
.
btnClearArea
.
Location
=
new
System
.
Drawing
.
Point
(
163
,
30
);
this
.
btnClearArea
.
Name
=
"btnClearArea"
;
this
.
btnClearArea
.
Name
=
"btnClearArea"
;
this
.
btnClearArea
.
Size
=
new
System
.
Drawing
.
Size
(
83
,
30
);
this
.
btnClearArea
.
Size
=
new
System
.
Drawing
.
Size
(
119
,
30
);
this
.
btnClearArea
.
StateColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))));
this
.
btnClearArea
.
StateColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))));
this
.
btnClearArea
.
TabIndex
=
6
;
this
.
btnClearArea
.
TabIndex
=
6
;
this
.
btnClearArea
.
Text
=
"清除"
;
this
.
btnClearArea
.
Text
=
"清除"
;
...
@@ -101,6 +102,7 @@ namespace AccAOI.control
...
@@ -101,6 +102,7 @@ namespace AccAOI.control
//
//
this
.
panAreaSet
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)(((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)
this
.
panAreaSet
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)(((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
panAreaSet
.
Controls
.
Add
(
this
.
btnClearArea
);
this
.
panAreaSet
.
Controls
.
Add
(
this
.
btnImgType
);
this
.
panAreaSet
.
Controls
.
Add
(
this
.
btnImgType
);
this
.
panAreaSet
.
Controls
.
Add
(
this
.
btnSetArea
);
this
.
panAreaSet
.
Controls
.
Add
(
this
.
btnSetArea
);
this
.
panAreaSet
.
Inside
=
false
;
this
.
panAreaSet
.
Inside
=
false
;
...
@@ -119,7 +121,7 @@ namespace AccAOI.control
...
@@ -119,7 +121,7 @@ namespace AccAOI.control
this
.
btnImgType
.
Inside
=
false
;
this
.
btnImgType
.
Inside
=
false
;
this
.
btnImgType
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
30
);
this
.
btnImgType
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
30
);
this
.
btnImgType
.
Name
=
"btnImgType"
;
this
.
btnImgType
.
Name
=
"btnImgType"
;
this
.
btnImgType
.
Size
=
new
System
.
Drawing
.
Size
(
1
15
,
30
);
this
.
btnImgType
.
Size
=
new
System
.
Drawing
.
Size
(
1
51
,
30
);
this
.
btnImgType
.
StateColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))));
this
.
btnImgType
.
StateColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))));
this
.
btnImgType
.
TabIndex
=
8
;
this
.
btnImgType
.
TabIndex
=
8
;
this
.
btnImgType
.
Text
=
"原图"
;
this
.
btnImgType
.
Text
=
"原图"
;
...
@@ -166,7 +168,6 @@ namespace AccAOI.control
...
@@ -166,7 +168,6 @@ namespace AccAOI.control
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
Font
;
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
Font
;
this
.
BackColor
=
System
.
Drawing
.
SystemColors
.
ActiveCaptionText
;
this
.
BackColor
=
System
.
Drawing
.
SystemColors
.
ActiveCaptionText
;
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
312
,
833
);
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
312
,
833
);
this
.
Controls
.
Add
(
this
.
btnClearArea
);
this
.
Controls
.
Add
(
this
.
panResult
);
this
.
Controls
.
Add
(
this
.
panResult
);
this
.
Controls
.
Add
(
this
.
panParam
);
this
.
Controls
.
Add
(
this
.
panParam
);
this
.
Controls
.
Add
(
this
.
panAreaSet
);
this
.
Controls
.
Add
(
this
.
panAreaSet
);
...
...
AccAOI/control/AioMarkControl.Designer.cs
查看文件 @
afe4a2a
...
@@ -97,7 +97,7 @@
...
@@ -97,7 +97,7 @@
this
.
lblResult
.
BackColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))));
this
.
lblResult
.
BackColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))));
this
.
lblResult
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
15.75F
,
System
.
Drawing
.
FontStyle
.
Bold
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
lblResult
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
15.75F
,
System
.
Drawing
.
FontStyle
.
Bold
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
lblResult
.
ForeColor
=
System
.
Drawing
.
Color
.
Red
;
this
.
lblResult
.
ForeColor
=
System
.
Drawing
.
Color
.
Red
;
this
.
lblResult
.
Location
=
new
System
.
Drawing
.
Point
(
12
,
11
4
);
this
.
lblResult
.
Location
=
new
System
.
Drawing
.
Point
(
12
,
9
4
);
this
.
lblResult
.
Name
=
"lblResult"
;
this
.
lblResult
.
Name
=
"lblResult"
;
this
.
lblResult
.
Size
=
new
System
.
Drawing
.
Size
(
276
,
24
);
this
.
lblResult
.
Size
=
new
System
.
Drawing
.
Size
(
276
,
24
);
this
.
lblResult
.
TabIndex
=
4
;
this
.
lblResult
.
TabIndex
=
4
;
...
@@ -109,7 +109,7 @@
...
@@ -109,7 +109,7 @@
this
.
btnTest
.
Font
=
new
System
.
Drawing
.
Font
(
"宋体"
,
9F
);
this
.
btnTest
.
Font
=
new
System
.
Drawing
.
Font
(
"宋体"
,
9F
);
this
.
btnTest
.
ImageSize
=
new
System
.
Drawing
.
Size
(
0
,
0
);
this
.
btnTest
.
ImageSize
=
new
System
.
Drawing
.
Size
(
0
,
0
);
this
.
btnTest
.
Inside
=
false
;
this
.
btnTest
.
Inside
=
false
;
this
.
btnTest
.
Location
=
new
System
.
Drawing
.
Point
(
92
,
56
);
this
.
btnTest
.
Location
=
new
System
.
Drawing
.
Point
(
92
,
40
);
this
.
btnTest
.
Name
=
"btnTest"
;
this
.
btnTest
.
Name
=
"btnTest"
;
this
.
btnTest
.
Size
=
new
System
.
Drawing
.
Size
(
115
,
30
);
this
.
btnTest
.
Size
=
new
System
.
Drawing
.
Size
(
115
,
30
);
this
.
btnTest
.
StateColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))));
this
.
btnTest
.
StateColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))));
...
@@ -122,7 +122,7 @@
...
@@ -122,7 +122,7 @@
this
.
lblTime
.
BackColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))));
this
.
lblTime
.
BackColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))));
this
.
lblTime
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
lblTime
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
lblTime
.
ForeColor
=
System
.
Drawing
.
Color
.
Green
;
this
.
lblTime
.
ForeColor
=
System
.
Drawing
.
Color
.
Green
;
this
.
lblTime
.
Location
=
new
System
.
Drawing
.
Point
(
12
,
1
4
9
);
this
.
lblTime
.
Location
=
new
System
.
Drawing
.
Point
(
12
,
1
2
9
);
this
.
lblTime
.
Name
=
"lblTime"
;
this
.
lblTime
.
Name
=
"lblTime"
;
this
.
lblTime
.
Size
=
new
System
.
Drawing
.
Size
(
276
,
24
);
this
.
lblTime
.
Size
=
new
System
.
Drawing
.
Size
(
276
,
24
);
this
.
lblTime
.
TabIndex
=
8
;
this
.
lblTime
.
TabIndex
=
8
;
...
...
AccAOI/control/AioMarkControl.cs
查看文件 @
afe4a2a
...
@@ -72,6 +72,8 @@ namespace AccAOI.control
...
@@ -72,6 +72,8 @@ namespace AccAOI.control
//}
//}
if
(
checkImg
==
null
)
if
(
checkImg
==
null
)
{
{
MyMessage
.
Show
(
"请选择测试图片"
);
return
;
checkImg
=
FrmAoiSetting
.
BaseImg
;
checkImg
=
FrmAoiSetting
.
BaseImg
;
}
}
DateTime
time
=
DateTime
.
Now
;
DateTime
time
=
DateTime
.
Now
;
...
...
AccAOI/control/AioTempMatchControl.Designer.cs
查看文件 @
afe4a2a
...
@@ -59,7 +59,7 @@
...
@@ -59,7 +59,7 @@
this
.
lblResult
.
BackColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))));
this
.
lblResult
.
BackColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))));
this
.
lblResult
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
15.75F
,
System
.
Drawing
.
FontStyle
.
Bold
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
lblResult
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
15.75F
,
System
.
Drawing
.
FontStyle
.
Bold
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
lblResult
.
ForeColor
=
System
.
Drawing
.
Color
.
Red
;
this
.
lblResult
.
ForeColor
=
System
.
Drawing
.
Color
.
Red
;
this
.
lblResult
.
Location
=
new
System
.
Drawing
.
Point
(
8
,
123
);
this
.
lblResult
.
Location
=
new
System
.
Drawing
.
Point
(
8
,
88
);
this
.
lblResult
.
Name
=
"lblResult"
;
this
.
lblResult
.
Name
=
"lblResult"
;
this
.
lblResult
.
Size
=
new
System
.
Drawing
.
Size
(
283
,
24
);
this
.
lblResult
.
Size
=
new
System
.
Drawing
.
Size
(
283
,
24
);
this
.
lblResult
.
TabIndex
=
4
;
this
.
lblResult
.
TabIndex
=
4
;
...
@@ -71,7 +71,7 @@
...
@@ -71,7 +71,7 @@
this
.
btnTest
.
Font
=
new
System
.
Drawing
.
Font
(
"宋体"
,
9F
);
this
.
btnTest
.
Font
=
new
System
.
Drawing
.
Font
(
"宋体"
,
9F
);
this
.
btnTest
.
ImageSize
=
new
System
.
Drawing
.
Size
(
0
,
0
);
this
.
btnTest
.
ImageSize
=
new
System
.
Drawing
.
Size
(
0
,
0
);
this
.
btnTest
.
Inside
=
false
;
this
.
btnTest
.
Inside
=
false
;
this
.
btnTest
.
Location
=
new
System
.
Drawing
.
Point
(
92
,
71
);
this
.
btnTest
.
Location
=
new
System
.
Drawing
.
Point
(
92
,
36
);
this
.
btnTest
.
Name
=
"btnTest"
;
this
.
btnTest
.
Name
=
"btnTest"
;
this
.
btnTest
.
Size
=
new
System
.
Drawing
.
Size
(
115
,
30
);
this
.
btnTest
.
Size
=
new
System
.
Drawing
.
Size
(
115
,
30
);
this
.
btnTest
.
StateColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))));
this
.
btnTest
.
StateColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))));
...
@@ -84,7 +84,7 @@
...
@@ -84,7 +84,7 @@
this
.
lblTime
.
BackColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))));
this
.
lblTime
.
BackColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
30
)))));
this
.
lblTime
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
lblTime
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
lblTime
.
ForeColor
=
System
.
Drawing
.
Color
.
Green
;
this
.
lblTime
.
ForeColor
=
System
.
Drawing
.
Color
.
Green
;
this
.
lblTime
.
Location
=
new
System
.
Drawing
.
Point
(
8
,
1
58
);
this
.
lblTime
.
Location
=
new
System
.
Drawing
.
Point
(
8
,
1
23
);
this
.
lblTime
.
Name
=
"lblTime"
;
this
.
lblTime
.
Name
=
"lblTime"
;
this
.
lblTime
.
Size
=
new
System
.
Drawing
.
Size
(
283
,
24
);
this
.
lblTime
.
Size
=
new
System
.
Drawing
.
Size
(
283
,
24
);
this
.
lblTime
.
TabIndex
=
8
;
this
.
lblTime
.
TabIndex
=
8
;
...
...
AccAOI/control/AioTempMatchControl.cs
查看文件 @
afe4a2a
...
@@ -70,6 +70,8 @@ namespace AccAOI.control
...
@@ -70,6 +70,8 @@ namespace AccAOI.control
//}
//}
if
(
checkImg
==
null
)
if
(
checkImg
==
null
)
{
{
MyMessage
.
Show
(
"请选择测试图片"
);
return
;
checkImg
=
FrmAoiSetting
.
BaseImg
;
checkImg
=
FrmAoiSetting
.
BaseImg
;
}
}
DateTime
time
=
DateTime
.
Now
;
DateTime
time
=
DateTime
.
Now
;
...
@@ -90,7 +92,7 @@ namespace AccAOI.control
...
@@ -90,7 +92,7 @@ namespace AccAOI.control
{
{
lblResult
.
ForeColor
=
Color
.
Red
;
lblResult
.
ForeColor
=
Color
.
Red
;
}
}
lblResult
.
Text
+=
" ("
+
result
.
samePercent
+
"%)"
;
lblResult
.
Text
+=
" ("
+
result
.
percentValue
+
"%)"
;
if
(
result
.
currentRoiImage
!=
null
)
if
(
result
.
currentRoiImage
!=
null
)
{
{
SetCurrImageType
(
2
);
SetCurrImageType
(
2
);
...
...
dll/AOI.dll
0 → 100644
查看文件 @
afe4a2a
此文件类型无法预览
dll/AccAOI.dll
0 → 100644
查看文件 @
afe4a2a
此文件类型无法预览
dll/AccImageBox.dll
0 → 100644
查看文件 @
afe4a2a
此文件类型无法预览
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论