Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Added QR_Code data flip support, flip and retry after first ECC failure#23275

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

@neg-c
Copy link
Contributor

@neg-cneg-c commentedFeb 18, 2023
edited
Loading

Merge with extra:opencv/opencv_extra#1046

Fixes#23249,fixes#23155,fixes#20724

Added quirc_flip() method to horizontally flip the data.
When the decoder fails to ECC the data we flip the image, and try one more time.

Pull Request Readiness Checklist

See details athttps://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

  • I agree to contribute to the project under Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
  • The PR is proposed to the proper branch
  • There is a reference to the original bug report and related work
  • There is accuracy test, performance test and test data in opencv_extra repository, if applicable
    Patch to opencv_extra has the same branch name.
  • The feature is well documented and sample code can be built with the project CMake

@neg-cneg-c changed the titleAdded QR_Code data flip support, flip and retry after first EEC failureAdded QR_Code data flip support, flip and retry after first ECC failureFeb 18, 2023
@neg-c
Copy link
ContributorAuthor

@alalek The test data for this PR is in :opencv_extra/pull/1046.

alalek reacted with thumbs up emoji

@neg-cneg-cforce-pushed thebug/issue-23249_detected_but_not_decoded_bug branch fromde7ea8d tode944b3CompareFebruary 23, 2023 21:15
@neg-c
Copy link
ContributorAuthor

@alalek@AleksandrPanov Is there something left to do in this PR from my side ?

@AleksandrPanov
Copy link
Contributor

AleksandrPanov commentedMar 14, 2023
edited
Loading

@genciberisha I found this issue in thequirc library:
QR code ECC failure #88
support horizontally flipped QR-codes according to ISO 18004:2015 #89

Your solution to the problem is correct, thank you. Test images must be converted to jpg to take up less space.

asmorkalov reacted with thumbs up emoji

@asmorkalov
Copy link
Contributor

asmorkalov commentedMar 14, 2023
edited
Loading

The PR contains 2 tests that are dependent. It's not stable solution for testing. I propose to remove generator part and hardcode information as static array. There are only 2 images, not need to dump regression data to file.

@asmorkalovasmorkalov self-requested a reviewMarch 14, 2023 11:06
@neg-cneg-cforce-pushed thebug/issue-23249_detected_but_not_decoded_bug branch 2 times, most recently from7b02524 to36bc181CompareMarch 15, 2023 22:32
@neg-c
Copy link
ContributorAuthor

neg-c commentedMar 15, 2023
edited
Loading

@AleksandrPanov Converting these images toJPG decreases the size a little but also with a lot off quality loss.
I managed to compress thesePNG file to under3kb size, hope that counts.


@asmorkalov Agreed, I removed the generation test and replaced it with a simple validation test.
Please note because of the nature of the bug we need to validate the data at the end, so I saw it reasonable to
to pack the filename and expected result as a std::pair.

asmorkalov and AleksandrPanov reacted with thumbs up emoji

Copy link
Contributor

@AleksandrPanovAleksandrPanov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

@genciberisha, thank you
I consider this solution to be optimal, because it's likequirc's solution.

neg-c reacted with thumbs up emoji
@neg-cneg-cforce-pushed thebug/issue-23249_detected_but_not_decoded_bug branch from36bc181 toa1b4aa5CompareMarch 20, 2023 13:28
@neg-c
Copy link
ContributorAuthor

@alalek Seems there isn't anything left here to do, thank you.

asmorkalov reacted with thumbs up emoji

@asmorkalovasmorkalov added this to the4.8.0 milestoneMar 21, 2023
@asmorkalovasmorkalov merged commite6bd4c9 intoopencv:4.xMar 21, 2023
@opencv-alalek
Copy link
Contributor

There isbuild error:

/build/4_x_ARMv7-lin/opencv/3rdparty/quirc/src/decode.c: In function 'quirc_flip':/build/4_x_ARMv7-lin/opencv/3rdparty/quirc/src/decode.c:923:9: warning: missing braces around initializer [-Wmissing-braces]  struct quirc_code flipped = {0};         ^/build/4_x_ARMv7-lin/opencv/3rdparty/quirc/src/decode.c:923:9: warning: (near initialization for 'flipped.corners') [-Wmissing-braces]/build/4_x_ARMv7-lin/opencv/3rdparty/quirc/src/decode.c:925:2: error: 'for' loop initial declarations are only allowed in C99 mode  for (int y = 0; y < code->size; y++) {  ^/build/4_x_ARMv7-lin/opencv/3rdparty/quirc/src/decode.c:925:2: note: use option -std=c99 or -std=gnu99 to compile your code/build/4_x_ARMv7-lin/opencv/3rdparty/quirc/src/decode.c:926:3: error: 'for' loop initial declarations are only allowed in C99 mode   for (int x = 0; x < code->size; x++) {   ^

@asmorkalov
Copy link
Contributor

@AleksandrPanov Could you fix it?

@asmorkalovasmorkalov mentioned this pull requestApr 12, 2023
6 tasks
@asmorkalovasmorkalov mentioned this pull requestMay 31, 2023
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@asmorkalovasmorkalovasmorkalov approved these changes

@AleksandrPanovAleksandrPanovAleksandrPanov approved these changes

Assignees

@AleksandrPanovAleksandrPanov

Projects

None yet

Milestone

4.8.0

Development

Successfully merging this pull request may close these issues.

QRCodeDetector - QR Code detected but no decoded text QrCodeReader decodes only when flipping image QR_code not detected

5 participants

@neg-c@AleksandrPanov@asmorkalov@opencv-alalek@alalek

[8]ページ先頭

©2009-2025 Movatter.jp