projects
/
platform
/
upstream
/
opencv.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0bb2c11
)
objdetect: validate input in qrcode
author
berak
<px1704@web.de>
Sat, 7 Jul 2018 14:56:40 +0000
(16:56 +0200)
committer
berak
<px1704@web.de>
Sat, 7 Jul 2018 14:56:40 +0000
(16:56 +0200)
modules/objdetect/src/qrcode.cpp
patch
|
blob
|
history
diff --git
a/modules/objdetect/src/qrcode.cpp
b/modules/objdetect/src/qrcode.cpp
index
f7c40a7
..
e3c8d55
100644
(file)
--- a/
modules/objdetect/src/qrcode.cpp
+++ b/
modules/objdetect/src/qrcode.cpp
@@
-71,8
+71,11
@@
bool QRDecode::localization()
Point begin, end;
std::vector<Vec3d> list_lines_x = searchVerticalLines();
+ if (list_lines_x.empty()) return false;
std::vector<Vec3d> list_lines_y = separateHorizontalLines(list_lines_x);
+ if (list_lines_y.empty()) return false;
std::vector<Vec3d> result_point = pointClustering(list_lines_y);
+ if (result_point.empty()) return false;
for (int i = 0; i < 3; i++)
{
localization_points.push_back(