Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
a9769b92
Commit
a9769b92
authored
Jun 07, 2019
by
Alexander Nesterov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove check and added binding tests
parent
aab9ef42
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
47 additions
and
1 deletion
+47
-1
QRCodeDetectorTest.java
modules/objdetect/misc/java/test/QRCodeDetectorTest.java
+29
-0
test_qrcode_detect.py
modules/objdetect/misc/python/test/test_qrcode_detect.py
+18
-0
qrcode.cpp
modules/objdetect/src/qrcode.cpp
+0
-1
No files found.
modules/objdetect/misc/java/test/QRCodeDetectorTest.java
0 → 100644
View file @
a9769b92
package
org
.
opencv
.
test
.
objdetect
;
import
org.opencv.core.Mat
;
import
org.opencv.objdetect.QRCodeDetector
;
import
org.opencv.imgcodecs.Imgcodecs
;
import
org.opencv.test.OpenCVTestCase
;
public
class
QRCodeDetectorTest
extends
OpenCVTestCase
{
private
final
static
String
ENV_OPENCV_TEST_DATA_PATH
=
"OPENCV_TEST_DATA_PATH"
;
private
String
testDataPath
;
@Override
protected
void
setUp
()
throws
Exception
{
super
.
setUp
();
testDataPath
=
System
.
getenv
(
ENV_OPENCV_TEST_DATA_PATH
);
if
(
testDataPath
==
null
)
throw
new
Exception
(
ENV_OPENCV_TEST_DATA_PATH
+
" has to be defined!"
);
}
public
void
testDetectAndDecode
()
{
Mat
img
=
Imgcodecs
.
imread
(
testDataPath
+
"/cv/qrcode/link_ocv.jpg"
);
QRCodeDetector
detector
=
new
QRCodeDetector
();
String
output
=
detector
.
detectAndDecode
(
img
);
assertEquals
(
output
,
"https://opencv.org/"
);
}
}
modules/objdetect/misc/python/test/test_qrcode_detect.py
0 → 100644
View file @
a9769b92
#!/usr/bin/env python
'''
===============================================================================
QR code detect and decode pipeline.
===============================================================================
'''
import
numpy
as
np
import
cv2
as
cv
from
tests_common
import
NewOpenCVTests
class
qrcode_detector_test
(
NewOpenCVTests
):
def
test_detect_and_decode
(
self
):
img
=
cv
.
imread
(
self
.
extraTestDataPath
+
'/cv/qrcode/link_ocv.jpg'
)
detector
=
cv
.
QRCodeDetector
()
retval
,
points
,
straight_qrcode
=
detector
.
detectAndDecode
(
img
)
self
.
assertEqual
(
retval
,
"https://opencv.org/"
);
modules/objdetect/src/qrcode.cpp
View file @
a9769b92
...
...
@@ -1084,7 +1084,6 @@ cv::String QRCodeDetector::decode(InputArray in, InputArray points,
inarr
=
gray
;
}
CV_Assert
(
points
.
isVector
());
vector
<
Point2f
>
src_points
;
points
.
copyTo
(
src_points
);
CV_Assert
(
src_points
.
size
()
==
4
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment