Merge pull request #16491 from rayonnant14:objdetect_decodeMulti_issue

* fixed issue with Mat reshape in decodeMulti()

* added test for decodeMulti

* used assign
This commit is contained in:
Polina Smolnikova
2020-02-04 19:31:11 +03:00
committed by GitHub
parent 17fe63446f
commit 4e4dfffe06
2 changed files with 22 additions and 1 deletions
+2 -1
View File
@@ -2304,7 +2304,8 @@ bool QRCodeDetector::decodeMulti(
CV_Assert((points.size().width % 4) == 0);
vector< vector< Point2f > > src_points ;
Mat qr_points = points.getMat();
for (int i = 0; i < points.size().width ; i += 4)
qr_points = qr_points.reshape(2, 1);
for (int i = 0; i < qr_points.size().width ; i += 4)
{
vector<Point2f> tempMat = qr_points.colRange(i, i + 4);
if (contourArea(tempMat) > 0.0)