Merge pull request #22659 from AleksandrPanov:qr_reduce_extra_adaptiveThreshold

QR code, reduce extra adaptiveThreshold()
This commit is contained in:
Alexander Smorkalov 2022-10-20 12:05:17 +03:00 committed by GitHub
commit e80b443cd9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2273,10 +2273,8 @@ bool QRDecode::updatePerspective()
pts.push_back(centerPt);
Mat H = findHomography(pts, perspective_points);
Mat bin_original;
adaptiveThreshold(original, bin_original, 255, ADAPTIVE_THRESH_GAUSSIAN_C, THRESH_BINARY, 83, 2);
Mat temp_intermediate;
warpPerspective(bin_original, temp_intermediate, H, temporary_size, INTER_NEAREST);
warpPerspective(bin_barcode, temp_intermediate, H, temporary_size, INTER_NEAREST);
no_border_intermediate = temp_intermediate(Range(1, temp_intermediate.rows), Range(1, temp_intermediate.cols));
const int border = cvRound(0.1 * test_perspective_size);