Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
张士柳
/
eyemLib
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
图表
网络
创建新的问题
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 5564312a
由
张士柳
编写于
2021-07-08 16:43:28 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
无
1 个父辈
92353bf2
显示空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
11 行增加
和
9 行删除
eyemLib-Sharp/EyemLib.cs
eyemLib/20210630版本/eyemMisc.cpp
eyemLib/eyemLib.h
eyemLib/eyemMisc.cpp
eyemLib-Sharp/EyemLib.cs
查看文件 @
5564312
...
@@ -1026,7 +1026,7 @@ namespace eyemLib_Sharp
...
@@ -1026,7 +1026,7 @@ namespace eyemLib_Sharp
private
static
extern
int
eyemCountObject
(
EyemImage
tpImage
,
EyemRect
tpRoi
,
string
fileName
,
double
dOffset
,
int
iMinArea
,
int
iMaxArea
,
int
iWinSize
,
ref
string
pNumObj
,
out
EyemImage
tpDstImg
);
private
static
extern
int
eyemCountObject
(
EyemImage
tpImage
,
EyemRect
tpRoi
,
string
fileName
,
double
dOffset
,
int
iMinArea
,
int
iMaxArea
,
int
iWinSize
,
ref
string
pNumObj
,
out
EyemImage
tpDstImg
);
//异型器件
//异型器件
[
DllImport
(
"eyemLib.dll"
,
CharSet
=
CharSet
.
None
,
CallingConvention
=
CallingConvention
.
Cdecl
)]
[
DllImport
(
"eyemLib.dll"
,
CharSet
=
CharSet
.
None
,
CallingConvention
=
CallingConvention
.
Cdecl
)]
private
static
extern
int
eyemCountObjectIrregularParts
(
EyemImage
tpImage
,
EyemRect
tpRoi
,
string
fileName
,
double
dOffset
,
string
strType
,
int
iMaxArea
,
int
iWinSiz
e
,
ref
string
pNumObj
,
out
EyemImage
tpDstImg
);
private
static
extern
int
eyemCountObjectIrregularParts
(
EyemImage
tpImage
,
EyemRect
tpRoi
,
string
fileName
,
string
strTyp
e
,
ref
string
pNumObj
,
out
EyemImage
tpDstImg
);
//普通器件(新版本)
//普通器件(新版本)
[
DllImport
(
"eyemLib.dll"
,
CharSet
=
CharSet
.
None
,
CallingConvention
=
CallingConvention
.
Cdecl
)]
[
DllImport
(
"eyemLib.dll"
,
CharSet
=
CharSet
.
None
,
CallingConvention
=
CallingConvention
.
Cdecl
)]
private
static
extern
int
eyemCountObjectE
(
EyemImage
tpImage
,
EyemRect
tpRoi
,
string
fileName
,
ref
string
pNumObj
,
out
EyemImage
tpDstImg
);
private
static
extern
int
eyemCountObjectE
(
EyemImage
tpImage
,
EyemRect
tpRoi
,
string
fileName
,
ref
string
pNumObj
,
out
EyemImage
tpDstImg
);
...
@@ -1144,7 +1144,7 @@ namespace eyemLib_Sharp
...
@@ -1144,7 +1144,7 @@ namespace eyemLib_Sharp
{
{
EyemImage
image
;
EyemImage
image
;
EyemImage
tpDstImg
=
new
EyemImage
();
EyemImage
tpDstImg
=
new
EyemImage
();
EyemOcsFXYR
tpCircle
=
new
EyemOcsFXYR
();
//
EyemOcsFXYR tpCircle = new EyemOcsFXYR();
//int flag = eyemImageReadRaw(fileName, 3072, 3072, 2, out ucpImage);
//int flag = eyemImageReadRaw(fileName, 3072, 3072, 2, out ucpImage);
int
flag
=
eyemImageRead
(
fileName
,
-
1
,
out
image
);
int
flag
=
eyemImageRead
(
fileName
,
-
1
,
out
image
);
if
(
flag
!=
0
)
if
(
flag
!=
0
)
...
@@ -1152,6 +1152,7 @@ namespace eyemLib_Sharp
...
@@ -1152,6 +1152,7 @@ namespace eyemLib_Sharp
Console
.
WriteLine
(
"读图失败!"
);
Console
.
WriteLine
(
"读图失败!"
);
return
;
return
;
}
}
Stopwatch
sw
=
new
Stopwatch
();
Stopwatch
sw
=
new
Stopwatch
();
sw
.
Restart
();
sw
.
Restart
();
...
@@ -1356,9 +1357,9 @@ namespace eyemLib_Sharp
...
@@ -1356,9 +1357,9 @@ namespace eyemLib_Sharp
EyemRect
tpRoi
=
new
EyemRect
();
EyemRect
tpRoi
=
new
EyemRect
();
tpRoi
.
iXs
=
200
;
tpRoi
.
iYs
=
20
0
;
tpRoi
.
iXs
=
200
;
tpRoi
.
iYs
=
15
0
;
tpRoi
.
iWidth
=
image
.
iWidth
-
400
;
tpRoi
.
iWidth
=
image
.
iWidth
-
400
;
tpRoi
.
iHeight
=
image
.
iHeight
-
4
00
;
tpRoi
.
iHeight
=
image
.
iHeight
-
3
00
;
//flag = eyemMulFuncTool(image, tpRoi, "__func1", 65, 75, ref tpCircle, out tpDstImg);
//flag = eyemMulFuncTool(image, tpRoi, "__func1", 65, 75, ref tpCircle, out tpDstImg);
...
@@ -1423,8 +1424,8 @@ namespace eyemLib_Sharp
...
@@ -1423,8 +1424,8 @@ namespace eyemLib_Sharp
//"IP_SMALL_PARTS","IP_LARGE_PARTS","IP_LONG_PARTS","IP_LOWCONTRAST_PARTS"
//"IP_SMALL_PARTS","IP_LARGE_PARTS","IP_LONG_PARTS","IP_LOWCONTRAST_PARTS"
//eyemCountObject(image, tpRoi, file.Replace(".png", ""), 35, 0, 100, 5, ref pNumObj, out tpDstImg);
//eyemCountObject(image, tpRoi, file.Replace(".png", ""), 35, 0, 100, 5, ref pNumObj, out tpDstImg);
eyemCountObjectIrregularParts
(
image
,
tpRoi
,
file
.
Replace
(
".png"
,
""
),
0.1
,
"IP_LARGE_PARTS"
,
100
,
7
,
ref
pNumObj
,
out
tpDstImg
);
//eyemCountObjectIrregularParts(image, tpRoi, file.Replace(".png", ""), "IP_LONG_PARTS"
, ref pNumObj, out tpDstImg);
//
eyemCountObjectE(image, tpRoi, fileName, ref pNumObj, out tpDstImg);
eyemCountObjectE
(
image
,
tpRoi
,
fileName
,
ref
pNumObj
,
out
tpDstImg
);
//eyemCountObjectIrregularPartsE(image, tpRoi, file.Replace(".png", ""), tpModels[0], hModelID, ref pNumObj, out tpDstImg);
//eyemCountObjectIrregularPartsE(image, tpRoi, file.Replace(".png", ""), tpModels[0], hModelID, ref pNumObj, out tpDstImg);
//eyemCountObjectIrregularPartsE(image, tpRoi, file.Replace(".png", ""), "D:\\模板文件\\" + /*file.Replace(".png", ".tpl")*/"74d571ed-9fd4-4959-85dd-3195261e4b48.tpl", ref pNumObj, out tpDstImg);
//eyemCountObjectIrregularPartsE(image, tpRoi, file.Replace(".png", ""), "D:\\模板文件\\" + /*file.Replace(".png", ".tpl")*/"74d571ed-9fd4-4959-85dd-3195261e4b48.tpl", ref pNumObj, out tpDstImg);
...
@@ -1434,7 +1435,8 @@ namespace eyemLib_Sharp
...
@@ -1434,7 +1435,8 @@ namespace eyemLib_Sharp
Bitmap
bitmap
=
eyemCvtToBitmap
(
tpDstImg
);
Bitmap
bitmap
=
eyemCvtToBitmap
(
tpDstImg
);
if
(
bitmap
!=
null
)
if
(
bitmap
!=
null
)
{
{
bitmap
.
Save
(
System
.
Windows
.
Forms
.
Application
.
StartupPath
+
"\\ResOut\\"
+
file
);
bitmap
.
Save
(
"D:\\ResOut\\"
+
file
);
//bitmap.Save(System.Windows.Forms.Application.StartupPath + "\\ResOut\\" + file);
}
}
//< 解码测试
//< 解码测试
...
@@ -1452,7 +1454,7 @@ namespace eyemLib_Sharp
...
@@ -1452,7 +1454,7 @@ namespace eyemLib_Sharp
//flag = eyemDetectAndDecodeBarcodeUseNN(image, tpRoi, out hObject, out tpResults, out ipNum, out tpDstImg);
//flag = eyemDetectAndDecodeBarcodeUseNN(image, tpRoi, out hObject, out tpResults, out ipNum, out tpDstImg);
sw
.
Stop
();
sw
.
Stop
();
Console
.
WriteLine
(
file
+
"--->"
+
"耗时:"
+
sw
.
ElapsedMilliseconds
.
ToString
()
+
",结果:"
+
pNumObj
);
Console
.
WriteLine
(
file
+
"--->"
+
"耗时:"
+
sw
.
ElapsedMilliseconds
.
ToString
()
+
"
毫秒"
+
"
,结果:"
+
pNumObj
);
//Bitmap bitmap = eyemCvtToBitmap(tpDstImg);
//Bitmap bitmap = eyemCvtToBitmap(tpDstImg);
...
...
eyemLib/20210630版本/eyemMisc.cpp
deleted
100644 → 0
查看文件 @
92353bf
此文件的差异太大,无法显示。
eyemLib/eyemLib.h
查看文件 @
5564312
...
@@ -824,7 +824,7 @@ extern "C" {
...
@@ -824,7 +824,7 @@ extern "C" {
EXPORTS
bool
eyemDetectAndDecodeFree
(
IntPtr
hObject
);
EXPORTS
bool
eyemDetectAndDecodeFree
(
IntPtr
hObject
);
EXPORTS
int
eyemCountObject
(
EyemImage
tpImage
,
EyemRect
tpRoi
,
const
char
*
fileName
,
double
dOffset
,
int
iMinArea
,
int
iMaxArea
,
int
iWinSize
,
LPSTR
*
lpszNumObj
,
EyemImage
*
tpDstImg
);
EXPORTS
int
eyemCountObject
(
EyemImage
tpImage
,
EyemRect
tpRoi
,
const
char
*
fileName
,
double
dOffset
,
int
iMinArea
,
int
iMaxArea
,
int
iWinSize
,
LPSTR
*
lpszNumObj
,
EyemImage
*
tpDstImg
);
EXPORTS
int
eyemCountObjectE
(
EyemImage
tpImage
,
EyemRect
tpRoi
,
const
char
*
fileName
,
LPSTR
*
lpszReelNum
,
EyemImage
*
tpDstImg
);
EXPORTS
int
eyemCountObjectE
(
EyemImage
tpImage
,
EyemRect
tpRoi
,
const
char
*
fileName
,
LPSTR
*
lpszReelNum
,
EyemImage
*
tpDstImg
);
EXPORTS
int
eyemCountObjectIrregularParts
(
EyemImage
tpImage
,
EyemRect
tpRoi
,
const
char
*
fileName
,
double
dOffset
,
const
char
*
ccSubType
,
int
iMaxArea
,
int
iWinSiz
e
,
LPSTR
*
lpszNumObj
,
EyemImage
*
tpDstImg
);
EXPORTS
int
eyemCountObjectIrregularParts
(
EyemImage
tpImage
,
EyemRect
tpRoi
,
const
char
*
fileName
,
const
char
*
ccSubTyp
e
,
LPSTR
*
lpszNumObj
,
EyemImage
*
tpDstImg
);
EXPORTS
int
eyemCountObjectIrregularPartsE
(
EyemImage
tpImage
,
EyemRect
tpRoi
,
const
char
*
fileName
,
const
char
*
ccTplName
,
IntPtr
hModelID
,
LPSTR
*
lpszReelNum
,
EyemImage
*
tpDstImg
);
EXPORTS
int
eyemCountObjectIrregularPartsE
(
EyemImage
tpImage
,
EyemRect
tpRoi
,
const
char
*
fileName
,
const
char
*
ccTplName
,
IntPtr
hModelID
,
LPSTR
*
lpszReelNum
,
EyemImage
*
tpDstImg
);
EXPORTS
int
eyemAchvTemplateImage
(
EyemImage
tpImage
,
EyemRect
tpRoi
,
EyemImage
*
tpDstImg
);
EXPORTS
int
eyemAchvTemplateImage
(
EyemImage
tpImage
,
EyemRect
tpRoi
,
EyemImage
*
tpDstImg
);
EXPORTS
int
eyemCreateTemplateModel
(
EyemImage
tpImage
,
EyemRect
tpRoi
,
double
dMinScore
,
const
char
*
ccTplName
);
EXPORTS
int
eyemCreateTemplateModel
(
EyemImage
tpImage
,
EyemRect
tpRoi
,
double
dMinScore
,
const
char
*
ccTplName
);
...
...
eyemLib/eyemMisc.cpp
查看文件 @
5564312
此文件的差异太大,无法显示。
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论