antfu / qr-scanner-wechat

QR Code scanner in JS with Open CV and WeChat's Algorithm
https://qrcode-wechat.netlify.app/
MIT License
313 stars 12 forks source link

wechat_qrcode from cv-contrib 4.5.4 contians an upstream binarizer bug #4

Open zcattacz opened 4 months ago

zcattacz commented 4 months ago

Describe the bug

See this upstream issue https://github.com/opencv/opencv_contrib/issues/3008 which is fixed in PR https://github.com/opencv/opencv_contrib/pull/3199, which is not merged https://github.com/opencv/opencv_contrib/pull/3237 until 2022/04, right before 4.6.0 is tagged on Jun 5, 2022. The previous release is 4.5.5 in 2021.

Reproduction

--

System Info

--

Used Package Manager

n/a

Validations

Contributions

zcattacz commented 4 months ago

According to that issue, one of the binarizer type is crippled, could you bump to v4.6 or manually apply the minor adjustments in https://github.com/opencv/opencv_contrib/pull/3199 ? I found binarization very efficient in decoding degraded QR codes printed on PET labels. It would be great to know the binarizers are applied correctly in each decode attempt.

zcattacz commented 4 months ago

https://github.com/opencv/opencv_contrib/pull/3484 may also worth fixing.