1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 15:53:03 +04:00

Merge remote-tracking branch 'upstream/3.4' into merge-3.4

This commit is contained in:
Alexander Alekhin
2019-06-07 19:02:55 +03:00
43 changed files with 446 additions and 112 deletions
@@ -3,9 +3,7 @@ package org.opencv.test.objdetect;
import org.opencv.core.Mat;
import org.opencv.objdetect.QRCodeDetector;
import org.opencv.imgcodecs.Imgcodecs;
import org.opencv.objdetect.Objdetect;
import org.opencv.test.OpenCVTestCase;
import org.opencv.test.OpenCVTestRunner;
public class QRCodeDetectorTest extends OpenCVTestCase {
@@ -0,0 +1,18 @@
#!/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/");
-1
View File
@@ -1068,7 +1068,6 @@ std::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);