Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
张士柳
/
eyemLib
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
图表
网络
创建新的问题
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 6b03fe92
由
张士柳
编写于
2021-03-19 16:21:30 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
无
1 个父辈
84029fbf
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
23 行增加
和
24 行删除
eyemLib-Sharp/EyemLib.cs
eyemLib/eyemLib.rc
eyemLib/eyemMisc.cpp
eyemLib-Sharp/EyemLib.cs
查看文件 @
6b03fe9
...
...
@@ -912,9 +912,9 @@ namespace eyemLib_Sharp
EyemRect
tpRoi
=
new
EyemRect
();
tpRoi
.
iXs
=
20
0
;
tpRoi
.
iYs
=
20
0
;
tpRoi
.
iWidth
=
image
.
iWidth
-
40
0
;
tpRoi
.
iHeight
=
image
.
iHeight
-
40
0
;
tpRoi
.
iXs
=
20
;
tpRoi
.
iYs
=
2
0
;
tpRoi
.
iWidth
=
image
.
iWidth
-
40
;
tpRoi
.
iHeight
=
image
.
iHeight
-
40
;
//
string
pNumObj
=
""
;
...
...
@@ -932,12 +932,12 @@ namespace eyemLib_Sharp
//创建模板匹配模型
EyemRect
tpRoi2
=
new
EyemRect
();
tpRoi2
.
iXs
=
1026
;
tpRoi2
.
iYs
=
513
;
tpRoi2
.
iWidth
=
41
;
tpRoi2
.
iHeight
=
14
;
tpRoi2
.
iXs
=
0
;
tpRoi2
.
iYs
=
0
;
tpRoi2
.
iWidth
=
image
.
iWidth
;
tpRoi2
.
iHeight
=
image
.
iHeight
;
double
matchDeg
=
0.75
;
//flag = eyemCreateTemplateModel(
tpDstImg
, tpRoi2, matchDeg, "D:\\模板文件\\" + file.Replace(".png", ".tpl"));
//flag = eyemCreateTemplateModel(
image
, tpRoi2, matchDeg, "D:\\模板文件\\" + file.Replace(".png", ".tpl"));
//string selectModel = "";
//flag = eyemMatchTemplateModel(tpDstImg, "D:\\模板文件", ref selectModel);
...
...
@@ -952,7 +952,7 @@ namespace eyemLib_Sharp
//eyemCountObjectIrregularPartsE(image, tpRoi, file.Replace(".png", ""), selectModel, ref pNumObj, out tpDstImg);
eyemCountObjectIrregularPartsE
(
image
,
tpRoi
,
file
.
Replace
(
".png"
,
""
),
"D:\\模板文件\\"
+
file
.
Replace
(
".png"
,
".tpl"
),
ref
pNumObj
,
out
tpDstImg
);
Bitmap
bitmap
=
eyemCvtToBitmap
(
tpDstImg
);
//
Bitmap bitmap = eyemCvtToBitmap(tpDstImg);
//if (bitmap != null)
//{
...
...
eyemLib/eyemLib.rc
查看文件 @
6b03fe9
此文件类型无法预览
eyemLib/eyemMisc.cpp
查看文件 @
6b03fe9
...
...
@@ -4470,15 +4470,17 @@ int eyemCountObjectIrregularPartsE(EyemImage tpImage, EyemRect tpRoi, const char
//偏移角度(元件尺寸)
const
double
dOffset
=
(
2
*
asin
(
2
*
trackLength
/
(
2
*
startRadius
)))
*
180.
/
PI
;
//优化开关
#define OPTIMAL_ON true
#if OPTIMAL_ON
//考虑作并行处理
tbb
::
parallel_invoke
(
[
&
]
#endif
{
std
::
cout
<<
tbb
::
this_tbb_thread
::
get_id
()
<<
std
::
endl
;
#pragma region //(顺时针)
{
///< 顺时针追踪
//追踪中心
cv
::
Point2f
trackCenter
=
cv
::
Point2f
(
startCenter
.
x
,
startCenter
.
y
);
//追踪角度、半径
...
...
@@ -4636,17 +4638,14 @@ int eyemCountObjectIrregularPartsE(EyemImage tpImage, EyemRect tpRoi, const char
trackEnd
=
(
!
found
);
}
while
(
!
trackEnd
);
}
#pragma endregion
},
}
#if OPTIMAL_ON
,
[
&
]
#endif
{
std
::
cout
<<
tbb
::
this_tbb_thread
::
get_id
()
<<
std
::
endl
;
#pragma region //(逆时针)
{
///< 逆时针追踪
//追踪起点
cv
::
Point2f
trackCenter
(
startCenter
.
x
,
startCenter
.
y
);
//起始扫描角度、半径
...
...
@@ -4800,9 +4799,9 @@ int eyemCountObjectIrregularPartsE(EyemImage tpImage, EyemRect tpRoi, const char
trackEnd
=
(
!
found
);
}
while
(
!
trackEnd
);
}
#
pragma endregion
});
#
if OPTIMAL_ON
);
#endif
}
//计数
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论