New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use QR code alignment markers #22891
Conversation
f04b7f4
to
ceb0ec7
Compare
ceb0ec7
to
995f454
Compare
It makes sense to enable all disabled tests for QR codes first. Version estimation and alignment markers should make more tests stable. |
429adcc
to
72a1a1f
Compare
6f099ea
to
171afaf
Compare
df2ed38
to
7d9142c
Compare
500a205
to
c4a00da
Compare
c4a00da
to
48f8bf9
Compare
177f5d2
to
aca6f07
Compare
@alalek May we merge the patch? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTW,
There is opencv_extra patch related to this (it should be marked on the first visible line instead of somewhere in the middle of description).
Test data size is >600kB for one test image.
std::string qrcode_images_multiple[] = { | ||
"2_qrcodes.png", "3_close_qrcodes.png", "3_qrcodes.png", "4_qrcodes.png", | ||
"2_qrcodes.png", /*"3_close_qrcodes.png",*/ "3_qrcodes.png", /*"4_qrcodes.png",*/ | ||
"5_qrcodes.png", "6_qrcodes.png", "7_qrcodes.png", "8_close_qrcodes.png" | ||
}; | ||
// 3_close_qrcodes.png, 4_qrcodes.png DISABLED after PR #22891 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some test cases are disabled (so it is formally a regression).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixing regression
|
||
std::vector<Mat1b> straight_barcode; | ||
qrcode.detectAndDecodeMulti(src, decoded_info, corners, straight_barcode); | ||
EXPECT_EQ(decoded_info.size(), 9ull); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again, wrong order.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reordered
opencv_extra patch notes moved to first line, test image was scaled to 306.2 kB There are 9 qr codes with big enough version in one test image (old test image 9_qrcodes.jpg has 290 kB size with low qrs version). |
ec878b4
to
cdc96b3
Compare
cdc96b3
to
dbd9126
Compare
dbd9126
to
a321430
Compare
@@ -114,7 +114,6 @@ PERF_TEST_P_(Perf_Objdetect_QRCode_Multi, decodeMulti) | |||
straight_barcode_sort.push_back(result[i].second); | |||
} | |||
SANITY_CHECK(decoded_info_sort); | |||
SANITY_CHECK(straight_barcode_sort); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some problem in 4_qrcodes.png
, 8_close_qrcodes.png
This QRs correctly decoded, but there is no bitwise equality in straight_barcode and golds. I think this is an optional check. A successful decode should mean that the test has passed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agreed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you 👍
merge with opencv/opencv_extra#1024
Added detect QR code alignment marker (1 marker for 2-6 versions, 6 markers for 7-40 versions). Alignment marker uses to find the correct position of the fourth corner.
To check the correctness, a benchmark was launched:
qr.py.txt
Logging from benchmark:
METRIC_CORNER_DIST_default.txt
METRIC_CORNER_DIST_new.txt
No decode regression now.
Pull Request Readiness Checklist
See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request
Patch to opencv_extra has the same branch name.