Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Opencv
提交
8facf61b
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 搜索 >>
提交
8facf61b
编写于
1月 28, 2020
作者:
A
Alexander Alekhin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
objdetect(QR): don't introduce deprecated API, compatibility code
上级
223790e6
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
37 addition
and
43 deletion
+37
-43
modules/objdetect/include/opencv2/objdetect.hpp
modules/objdetect/include/opencv2/objdetect.hpp
+37
-23
modules/objdetect/src/qrcode.cpp
modules/objdetect/src/qrcode.cpp
+0
-20
未找到文件。
modules/objdetect/include/opencv2/objdetect.hpp
浏览文件 @
8facf61b
...
...
@@ -743,6 +743,43 @@ public:
OutputArrayOfArrays
straight_qrcode
=
noArray
()
)
const
;
#ifndef CV_DOXYGEN // COMPATIBILITY
inline
bool
decodeMulti
(
InputArray
img
,
InputArray
points
,
CV_OUT
std
::
vector
<
std
::
string
>&
decoded_info
,
OutputArrayOfArrays
straight_qrcode
=
noArray
()
)
const
{
std
::
vector
<
cv
::
String
>
decoded_info_
;
bool
res
=
decodeMulti
(
img
,
points
,
decoded_info_
,
straight_qrcode
);
decoded_info
.
resize
(
decoded_info_
.
size
());
for
(
size_t
i
=
0
;
i
<
decoded_info
.
size
();
++
i
)
{
cv
::
String
s
;
std
::
swap
(
s
,
decoded_info_
[
i
]);
decoded_info
[
i
]
=
s
;
}
return
res
;
}
inline
bool
detectAndDecodeMulti
(
InputArray
img
,
CV_OUT
std
::
vector
<
std
::
string
>&
decoded_info
,
OutputArray
points
=
noArray
(),
OutputArrayOfArrays
straight_qrcode
=
noArray
()
)
const
{
std
::
vector
<
cv
::
String
>
decoded_info_
;
bool
res
=
detectAndDecodeMulti
(
img
,
decoded_info_
,
points
,
straight_qrcode
);
decoded_info
.
resize
(
decoded_info_
.
size
());
for
(
size_t
i
=
0
;
i
<
decoded_info
.
size
();
++
i
)
{
cv
::
String
s
;
std
::
swap
(
s
,
decoded_info_
[
i
]);
decoded_info
[
i
]
=
s
;
}
return
res
;
}
#endif
protected:
struct
Impl
;
Ptr
<
Impl
>
p
;
...
...
@@ -764,29 +801,6 @@ CV_EXPORTS bool detectQRCode(InputArray in, std::vector<Point> &points, double e
*/
CV_EXPORTS
bool
decodeQRCode
(
InputArray
in
,
InputArray
points
,
std
::
string
&
decoded_info
,
OutputArray
straight_qrcode
=
noArray
());
/** @brief Detect QR codes in image and return vector of minimum area of quadrangle that describes QR codes.
@param in Matrix of the type CV_8UC1 containing an image where QR codes are detected.
@param points Output vector of vertices of quadrangles of minimal area that describes QR codes.
@param eps_x Epsilon neighborhood, which allows you to determine the horizontal pattern of the scheme 1:1:3:1:1 according to QR code standard.
@param eps_y Epsilon neighborhood, which allows you to determine the vertical pattern of the scheme 1:1:3:1:1 according to QR code standard.
*/
CV_EXPORTS
bool
detectQRCodeMulti
(
InputArray
in
,
std
::
vector
<
Point
>
&
points
,
double
eps_x
=
0.2
,
double
eps_y
=
0.1
);
/** @brief Decode QR codes in image and return text that is encrypted in QR code.
@param in Matrix of the type CV_8UC1 containing an image where QR code are detected.
@param points Input vector of vertices of quadrangles of minimal area that describes QR codes.
@param decoded_info vector of String information that is encrypted in QR codes.
@param straight_qrcode vector of Matrixes of the type CV_8UC1 containing an binary straight QR codes.
*/
CV_EXPORTS
bool
decodeQRCodeMulti
(
InputArray
in
,
InputArray
points
,
CV_OUT
std
::
vector
<
std
::
string
>
&
decoded_info
,
OutputArrayOfArrays
straight_qrcode
=
noArray
());
//! @} objdetect
}
...
...
modules/objdetect/src/qrcode.cpp
浏览文件 @
8facf61b
...
...
@@ -2234,14 +2234,6 @@ bool QRCodeDetector::detectMulti(InputArray in, OutputArray points) const
return
true
;
}
bool
detectQRCodeMulti
(
InputArray
in
,
vector
<
Point
>
&
points
,
double
eps_x
,
double
eps_y
)
{
QRCodeDetector
qrdetector
;
qrdetector
.
setEpsX
(
eps_x
);
qrdetector
.
setEpsY
(
eps_y
);
return
qrdetector
.
detectMulti
(
in
,
points
);
}
class
ParallelDecodeProcess
:
public
ParallelLoopBody
{
public:
...
...
@@ -2385,16 +2377,4 @@ bool QRCodeDetector::detectAndDecodeMulti(
return
ok
;
}
bool
decodeQRCodeMulti
(
InputArray
in
,
InputArray
points
,
vector
<
std
::
string
>
&
decoded_info
,
OutputArrayOfArrays
straight_qrcode
)
{
QRCodeDetector
qrcode
;
vector
<
cv
::
String
>
info
;
bool
ok
=
qrcode
.
decodeMulti
(
in
,
points
,
info
,
straight_qrcode
);
for
(
size_t
i
=
0
;
i
<
info
.
size
();
i
++
)
decoded_info
.
push_back
(
info
[
i
]);
return
ok
;
}
}
// namespace
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录