Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
GeneralClassLibrary
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 63305355
由
LN
编写于
2020-08-26 17:37:38 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
代码优化
1 个父辈
e20c1059
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
21 行增加
和
5 行删除
CodeLibraryProject/CodeLibrary/HDCodeHelper.cs
CodeLibraryProject/CodeLibrary/HDCodeLearnHelper.cs
CodeLibraryProject/CodeLibrary/camera/HIK.cs
CodeLibraryProject/CodeLibrary/HDCodeHelper.cs
查看文件 @
6330535
...
@@ -143,6 +143,13 @@ namespace CodeLibrary
...
@@ -143,6 +143,13 @@ namespace CodeLibrary
}
}
}
}
HDLogUtil
.
debug
(
" DecodeCode["
+
symbolType
+
"]["
+
hv_model_path
+
"]["
+
codeCount
+
"] 结束,返回数量:"
+
codeList
.
Count
);
HDLogUtil
.
debug
(
" DecodeCode["
+
symbolType
+
"]["
+
hv_model_path
+
"]["
+
codeCount
+
"] 结束,返回数量:"
+
codeList
.
Count
);
if
(
ho_SymbolXLDs
!=
null
)
{
ho_SymbolXLDs
.
Dispose
();
ho_SymbolXLDs
=
null
;
}
return
codeList
;
return
codeList
;
}
}
catch
(
Exception
ex
)
catch
(
Exception
ex
)
...
...
CodeLibraryProject/CodeLibrary/HDCodeLearnHelper.cs
查看文件 @
6330535
...
@@ -219,7 +219,7 @@ namespace CodeLibrary
...
@@ -219,7 +219,7 @@ namespace CodeLibrary
CodeResultAdd
(
hv_DecodedDataStrings
,
codeType
,
"学习"
);
CodeResultAdd
(
hv_DecodedDataStrings
,
codeType
,
"学习"
);
}
}
ShowImage
(
hv_ExpDefaultWinHandle
,
ho_Image
,
ho_SymbolXLDs
);
ShowImage
(
hv_ExpDefaultWinHandle
,
ho_Image
,
ho_SymbolXLDs
);
ho_Image
.
Dispose
();
}
}
if
(
findCode
.
Count
>=
codeCount
||
stopWatch
.
ElapsedMilliseconds
>
timeOutMs
)
if
(
findCode
.
Count
>=
codeCount
||
stopWatch
.
ElapsedMilliseconds
>
timeOutMs
)
{
{
...
...
CodeLibraryProject/CodeLibrary/camera/HIK.cs
查看文件 @
6330535
...
@@ -351,6 +351,7 @@ namespace CodeLibrary
...
@@ -351,6 +351,7 @@ namespace CodeLibrary
Open
(
name
);
Open
(
name
);
}
}
MyCamera
.
MV_FRAME_OUT
FrameInfo
=
new
MyCamera
.
MV_FRAME_OUT
();
try
try
{
{
int
rtn
=
cameraCurr
[
index
].
MV_CC_StartGrabbing_NET
();
int
rtn
=
cameraCurr
[
index
].
MV_CC_StartGrabbing_NET
();
...
@@ -359,12 +360,12 @@ namespace CodeLibrary
...
@@ -359,12 +360,12 @@ namespace CodeLibrary
_errInfo
=
"Can not grab one : "
+
rtn
;
_errInfo
=
"Can not grab one : "
+
rtn
;
return
null
;
return
null
;
}
}
MyCamera
.
MV_FRAME_OUT
FrameInfo
=
new
MyCamera
.
MV_FRAME_OUT
();
int
nRet
=
cameraCurr
[
index
].
MV_CC_GetImageBuffer_NET
(
ref
FrameInfo
,
1000
);
int
nRet
=
cameraCurr
[
index
].
MV_CC_GetImageBuffer_NET
(
ref
FrameInfo
,
1000
);
// ch:获取一帧图像 | en:Get one image
// ch:获取一帧图像 | en:Get one image
if
(
MyCamera
.
MV_OK
==
nRet
)
if
(
MyCamera
.
MV_OK
==
nRet
)
{
{
Console
.
WriteLine
(
"Get Image Buffer:"
+
"Width["
+
Convert
.
ToString
(
FrameInfo
.
stFrameInfo
.
nWidth
)
+
"] , Height["
+
Convert
.
ToString
(
FrameInfo
.
stFrameInfo
.
nHeight
)
HDLogUtil
.
debug
(
"Get Image Buffer:"
+
"Width["
+
Convert
.
ToString
(
FrameInfo
.
stFrameInfo
.
nWidth
)
+
"] , Height["
+
Convert
.
ToString
(
FrameInfo
.
stFrameInfo
.
nHeight
)
+
"] , FrameNum["
+
Convert
.
ToString
(
FrameInfo
.
stFrameInfo
.
nFrameNum
)
+
"]"
);
+
"] , FrameNum["
+
Convert
.
ToString
(
FrameInfo
.
stFrameInfo
.
nFrameNum
)
+
"]"
);
HObject
ho_Imagetemp
;
HObject
ho_Imagetemp
;
...
@@ -375,14 +376,14 @@ namespace CodeLibrary
...
@@ -375,14 +376,14 @@ namespace CodeLibrary
nRet
=
cameraCurr
[
index
].
MV_CC_FreeImageBuffer_NET
(
ref
FrameInfo
);
nRet
=
cameraCurr
[
index
].
MV_CC_FreeImageBuffer_NET
(
ref
FrameInfo
);
if
(
nRet
!=
MyCamera
.
MV_OK
)
if
(
nRet
!=
MyCamera
.
MV_OK
)
{
{
Console
.
WriteLine
(
"Free Image Buffer fail:{0:x8}"
,
nRet
);
HDLogUtil
.
error
(
" ["
+
name
+
"] Free Image Buffer fail:"
+
nRet
);
}
}
}
}
return
ho_Imagetemp
;
return
ho_Imagetemp
;
}
}
else
else
{
{
Console
.
WriteLine
(
"No data:{0:x8}"
,
nRet
);
HDLogUtil
.
error
(
" ["
+
name
+
"] MV_CC_GetImageBuffer_NET No data: "
+
nRet
);
}
}
}
}
catch
(
Exception
ex
)
catch
(
Exception
ex
)
...
@@ -393,6 +394,14 @@ namespace CodeLibrary
...
@@ -393,6 +394,14 @@ namespace CodeLibrary
finally
finally
{
{
cameraCurr
[
index
].
MV_CC_StopGrabbing_NET
();
cameraCurr
[
index
].
MV_CC_StopGrabbing_NET
();
try
{
cameraCurr
[
index
].
MV_CC_FreeImageBuffer_NET
(
ref
FrameInfo
);
}
catch
(
Exception
ex
)
{
HDLogUtil
.
error
(
" ["
+
name
+
"] MV_CC_FreeImageBuffer_NET 出错:"
+
ex
.
ToString
());
}
}
}
return
null
;
return
null
;
}
}
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论