Skip to content

Date type fixer #2972

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

Merged
merged 2 commits into from
Jun 15, 2021
Merged

Date type fixer #2972

merged 2 commits into from
Jun 15, 2021

Conversation

Channingss
Copy link
Contributor

Fixes #2911

When the hand is covered, there are too many unicomblock, which resulting in a large m_iNowIdx, but the data type is unsigned short, make data overflow to zero.

and it will fall into an infinite loop:

if (iPosition >= 0 && iPosition < int(m_vcIndex.size()) && 0 == m_vcIndex[iPosition]) {

so we need modify data type from unsigned short to unsigned int.

force_builders=linux,docs

@Channingss
Copy link
Contributor Author

Just waiting for Maintainers to trigger CI manually.

@Channingss Channingss mentioned this pull request Jun 11, 2021
4 tasks
Copy link
Member

@alalek alalek left a comment

Choose a reason for hiding this comment

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

Thank you for contribution 👍

@alalek alalek merged commit 10d1020 into opencv:master Jun 15, 2021
@billyany
Copy link

This just fixed crash and didn't get close to the program getting stuck for a long time,I tested a 4.5mb image, which took as much as 2m28.953s

@Channingss
Copy link
Contributor Author

This just fixed crash and didn't get close to the program getting stuck for a long time,I tested a 4.5mb image, which took as much as 2m28.953s

@alalek We also encountered this problem.

@dddzg
Copy link
Contributor

dddzg commented Jul 6, 2021

Hi, @Channingss and @billklk .
Thanks for you attention. The wechat qrcode module is mainly designed for mobile phone with normal image. To high decoding accuracy, we will try a lot of different binarizers(Hybrid, FastWindow and etc) and pattern finders(scan line algorithm and use connected cells algorithm), which will take more time.

Try to decrease the binarizers(

m_vecRotateBinarizer.push_back(Hybrid);
) and pattern finders ( )

As far as we observe, connected cells algorithm may take more time. You can try to disable it.

@philp123 philp123 mentioned this pull request Aug 6, 2021
6 tasks
@alalek alalek mentioned this pull request Oct 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

wechat_qrcode exception
4 participants