Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
ACSingleStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 177a22bb
由
LN
编写于
2019-12-06 09:17:22 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1
1 个父辈
03aa9174
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
7 行增加
和
24 行删除
dll/CodeLibrary.dll
dll/halcon.dll
source/DeviceLibrary/halcon/CodeManager.cs
dll/CodeLibrary.dll
查看文件 @
177a22b
此文件类型无法预览
dll/halcon.dll
查看文件 @
177a22b
此文件太大,无法显示。
source/DeviceLibrary/halcon/CodeManager.cs
查看文件 @
177a22b
...
@@ -132,17 +132,13 @@ namespace OnlineStore.DeviceLibrary
...
@@ -132,17 +132,13 @@ namespace OnlineStore.DeviceLibrary
{
{
if
(
balserNameList
.
Contains
(
cameraName
))
if
(
balserNameList
.
Contains
(
cameraName
))
{
{
bool
result
=
BaslerCamera
.
Instance
.
IsOpen
;
bool
result
=
BaslerCamera
.
Instance
.
Open
(
cameraName
);
if
(!
result
)
// LogUtil.info("打开相机:" + cameraName + "(" + result + ")");
{
result
=
BaslerCamera
.
Instance
.
Open
(
cameraName
);
LogUtil
.
info
(
"打开相机:"
+
cameraName
+
"("
+
result
+
")"
);
}
if
(
result
)
if
(
result
)
{
{
BaslerCamera
.
Instance
.
GrabOne
();
BaslerCamera
.
Instance
.
GrabOne
();
bitm
=
BaslerCamera
.
Instance
.
Image
;
bitm
=
BaslerCamera
.
Instance
.
Image
;
//
BaslerCamera.Instance.Close();
BaslerCamera
.
Instance
.
Close
();
}
}
else
else
{
{
...
@@ -151,17 +147,13 @@ namespace OnlineStore.DeviceLibrary
...
@@ -151,17 +147,13 @@ namespace OnlineStore.DeviceLibrary
}
}
else
if
(
hikNameList
.
Contains
(
cameraName
))
else
if
(
hikNameList
.
Contains
(
cameraName
))
{
{
bool
result
=
HIKCamera
.
Instance
.
IsOpen
;
bool
result
=
HIKCamera
.
Instance
.
Open
(
cameraName
);
if
(!
result
)
// LogUtil.info("打开相机:" + cameraName + "(" + result + ")");
{
result
=
HIKCamera
.
Instance
.
Open
(
cameraName
);
LogUtil
.
info
(
"打开相机:"
+
cameraName
+
"("
+
result
+
")"
);
}
if
(
result
)
if
(
result
)
{
{
HIKCamera
.
Instance
.
GrabOne
();
HIKCamera
.
Instance
.
GrabOne
();
bitm
=
HIKCamera
.
Instance
.
Image
;
bitm
=
HIKCamera
.
Instance
.
Image
;
//
HIKCamera.Instance.Close();
HIKCamera
.
Instance
.
Close
();
}
}
else
else
{
{
...
@@ -207,13 +199,6 @@ namespace OnlineStore.DeviceLibrary
...
@@ -207,13 +199,6 @@ namespace OnlineStore.DeviceLibrary
LogUtil
.
debug
(
" 摄像机【"
+
cameraName
+
"】获取图片完成"
);
LogUtil
.
debug
(
" 摄像机【"
+
cameraName
+
"】获取图片完成"
);
System
.
Threading
.
Thread
.
Sleep
(
1
);
System
.
Threading
.
Thread
.
Sleep
(
1
);
if
(
DeCodeType
.
Equals
(
1
))
{
List
<
string
>
result
=
CodeLibrary
.
ZXingCodeHelper
.
DecodeQRCodes
(
bitmap
);
return
result
;
}
else
{
HalconDotNet
.
HObject
ho_Image
=
HDCodeHelper
.
Bitmap2HObjectBpp24
(
bitmap
);
HalconDotNet
.
HObject
ho_Image
=
HDCodeHelper
.
Bitmap2HObjectBpp24
(
bitmap
);
LogUtil
.
debug
(
" 摄像机【"
+
cameraName
+
"】转换图片完成,开始扫码"
);
LogUtil
.
debug
(
" 摄像机【"
+
cameraName
+
"】转换图片完成,开始扫码"
);
List
<
CodeInfo
>
cc
=
new
List
<
CodeInfo
>();
List
<
CodeInfo
>
cc
=
new
List
<
CodeInfo
>();
...
@@ -236,10 +221,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -236,10 +221,8 @@ namespace OnlineStore.DeviceLibrary
codeList
.
Add
(
c
.
CodeStr
);
codeList
.
Add
(
c
.
CodeStr
);
r
=
r
+
"##"
+
c
.
CodeStr
;
r
=
r
+
"##"
+
c
.
CodeStr
;
}
}
LogUtil
.
info
(
" 【"
+
cameraName
+
"】【"
+
codeType
+
"】扫码完成:"
+
r
);
LogUtil
.
debug
(
" 【"
+
cameraName
+
"】【"
+
codeType
+
"】扫码完成:"
+
r
);
}
}
}
}
}
}
}
}
}
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论