Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Opencv
提交
170cc036
O
Opencv
项目概览
Greenplum
/
Opencv
10 个月 前同步成功
通知
7
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
Opencv
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
未验证
提交
170cc036
编写于
6月 13, 2023
作者:
A
Alexander Smorkalov
提交者:
GitHub
6月 13, 2023
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #23789 from asmorkalov:as/python_aruco_qr
Added Aruco-based QR code detection method to python sample
上级
a371bdac
3f4ec359
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
15 addition
and
2 deletion
+15
-2
samples/python/qrcode.py
samples/python/qrcode.py
+15
-2
未找到文件。
samples/python/qrcode.py
浏览文件 @
170cc036
...
...
@@ -33,6 +33,7 @@ class QrSample:
self
.
multi
=
args
.
multi
self
.
saveDetections
=
args
.
save_detections
self
.
saveAll
=
args
.
save_all
self
.
arucoBased
=
args
.
aruco_based
def
getQRModeString
(
self
):
msg1
=
"multi "
if
self
.
multi
else
""
...
...
@@ -104,7 +105,12 @@ class QrSample:
return
print
(
'Run {:s} on image [{:d}x{:d}]'
.
format
(
self
.
getQRModeString
(),
inputimg
.
shape
[
1
],
inputimg
.
shape
[
0
]))
qrCode
=
cv
.
QRCodeDetector
()
if
self
.
arucoBased
:
qrCode
=
cv
.
QRCodeDetectorAruco
()
else
:
qrCode
=
cv
.
QRCodeDetector
()
count
=
10
timer
=
cv
.
TickMeter
()
for
_
in
range
(
count
):
...
...
@@ -152,7 +158,10 @@ class QrSample:
print
(
"Press ' ' (space) to save result into images"
)
print
(
"Press 'ESC' to exit"
)
qrcode
=
cv
.
QRCodeDetector
()
if
self
.
arucoBased
:
qrcode
=
cv
.
QRCodeDetectorAruco
()
else
:
qrcode
=
cv
.
QRCodeDetector
()
while
True
:
ret
,
frame
=
cap
.
read
()
...
...
@@ -204,6 +213,10 @@ def main():
help
=
"input image path (for example, 'opencv_extra/testdata/cv/qrcode/multiple/*_qrcodes.png)"
,
default
=
""
,
metavar
=
""
)
parser
.
add_argument
(
'--aruco_based'
,
help
=
"use aruco-based detector"
,
action
=
'store_true'
)
parser
.
add_argument
(
'-d'
,
'--detect'
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录