Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
GeneralClassLibrary
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 200cea5e
由
LN
编写于
2020-03-13 15:20:23 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
参数修改
1 个父辈
5c989fcf
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
19 行增加
和
19 行删除
CodeLibraryProject/CodeLibrary/FrmCodeDecode.cs
CodeLibraryProject/CodeLibrary/HDCodeHelper.cs
CodeLibraryProject/CodeLibrary/camera/HIK.cs
CodeLibraryProject/CodeLibrary/FrmCodeDecode.cs
查看文件 @
200cea5
...
...
@@ -154,11 +154,11 @@ namespace CodeLibrary
stopwatch
.
Restart
();
HDCodeHelper
.
HalconWindow
=
this
.
hWindowControl1
.
HalconWindow
;
Bitmap
map
=
new
Bitmap
(
pictureBox1
.
Image
);
if
(
chbZxing
.
Checked
)
{
zxingDecode
(
map
,
"barcode"
);
}
else
//
if (chbZxing.Checked)
//
{
//
zxingDecode(map, "barcode");
//
}
//
else
{
List
<
CodeInfo
>
result
=
HDCodeHelper
.
DecodeBarCode
(
map
);
ShowCode
(
result
);
...
...
@@ -206,11 +206,11 @@ namespace CodeLibrary
{
codeParamPath
=
""
;
}
if
(
chbZxing
.
Checked
)
{
zxingDecode
(
map
,
cmbCodeType
.
Text
);
}
else
//
if (chbZxing.Checked)
//
{
//
zxingDecode(map, cmbCodeType.Text);
//
}
//
else
{
List
<
CodeInfo
>
codeList
=
new
List
<
CodeInfo
>();
if
(
cmbCodeType
.
Text
.
ToLower
().
Equals
(
"barcode"
))
...
...
@@ -235,14 +235,14 @@ namespace CodeLibrary
}
private
void
zxingDecode
(
Bitmap
map
,
string
type
)
{
List
<
string
>
results
=
ZXingCodeHelper
.
DeCodes
(
map
,
type
);
//
List<string> results = ZXingCodeHelper.DeCodes(map, type);
txtResult
.
Text
=
" zxing decode:"
;
foreach
(
string
code
in
results
)
{
txtResult
.
Text
+=
"\r\n"
+
"\r\n"
+
code
;
}
txtResult
.
Text
+=
"\r\n \r\n elapsed time:"
+
stopwatch
.
Elapsed
.
ToString
();
//
txtResult.Text = " zxing decode:";
//
foreach (string code in results)
//
{
//
txtResult.Text += "\r\n" + "\r\n" + code;
//
}
//
txtResult.Text += "\r\n \r\n elapsed time:" + stopwatch.Elapsed.ToString();
}
private
void
btnClearLog_Click
(
object
sender
,
EventArgs
e
)
...
...
CodeLibraryProject/CodeLibrary/HDCodeHelper.cs
查看文件 @
200cea5
...
...
@@ -200,7 +200,7 @@ namespace CodeLibrary
ho_Image
.
Dispose
();
Rectangle
rect
=
new
Rectangle
(
0
,
0
,
bmp
.
Width
,
bmp
.
Height
);
BitmapData
srcBmpData
=
bmp
.
LockBits
(
rect
,
ImageLockMode
.
ReadOnly
,
PixelFormat
.
Format32bppRgb
);
BitmapData
srcBmpData
=
bmp
.
LockBits
(
rect
,
ImageLockMode
.
ReadOnly
,
bmp
.
PixelFormat
);
HOperatorSet
.
GenImageInterleaved
(
out
ho_Image
,
srcBmpData
.
Scan0
,
"bgrx"
,
bmp
.
Width
,
bmp
.
Height
,
0
,
"byte"
,
0
,
0
,
0
,
0
,
-
1
,
0
);
bmp
.
UnlockBits
(
srcBmpData
);
...
...
CodeLibraryProject/CodeLibrary/camera/HIK.cs
查看文件 @
200cea5
...
...
@@ -145,7 +145,7 @@ namespace CodeLibrary
int
rtn
=
cameraCurr
[
index
].
MV_CC_StartGrabbing_NET
();
if
(
rtn
!=
MyCamera
.
MV_OK
)
{
_errInfo
=
"Can not grab one
"
;
_errInfo
=
"Can not grab one
: "
+
rtn
;
return
null
;
}
return
ImageCapture
(
index
);
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论