not detecting qrcode
Opened this issue · 3 comments
MyTDT-Mysoft commented
dlbeer commented
On Thu, Apr 02, 2020 at 04:44:58AM -0700, MyTDT-Mysoft wrote:
hi, this image have 3 copies of the same qrcode, the 2 big (doubled) ones it does detect, the "normal" one it does not... i know it does not detect because theres a few non square blocks but it should detect anyway
![425_920](https://user-images.githubusercontent.com/16870416/78245625-2c0ed800-74be-11ea-8f36-7d09589f524e.png)
It looks like you have an aliasing problem in the small QR code -- the
cell sizes vary by a pixel or two, which is quite large compared to the
mean cell size. This prevents the finder scan from detecting the
top-right capstone. Perhaps it's been rescaled by nearest-neighbour from
a larger code?
…--
Daniel Beer <dlbeer@gmail.com> http://dlbeer.co.nz/
PGP: BA6E 0B26 1F89 246C E3F3 C910 1E58 C43A 160A 553B
MyTDT-Mysoft commented
yes that could be the case... it's a spl rendered from spl2pdf (saved as png), but zbar and zxing work with this one... so i just wanted you to know :)
dlbeer commented
On Sun, Apr 05, 2020 at 03:35:12PM -0700, MyTDT-Mysoft wrote:
yes that could be the case... it's a spl rendered from spl2pdf (saved
as png), but zbar and zxing work with this one... so i just wanted you
to know :)
You could fudge the error calculation in finder_scan() to make it work.
The other thing you probably need to do with so many large codes in one
image is increase QUIRC_MAX_REGIONS (this will need a full rebuild with
"make clean").
You might also find useful the "inspect" tool bundled with the source.
This will show you the internal state of the QR code detector, which is
helpful when codes aren't being recognized.
Cheers,
Daniel
…--
Daniel Beer <dlbeer@gmail.com> http://dlbeer.co.nz/
PGP: BA6E 0B26 1F89 246C E3F3 C910 1E58 C43A 160A 553B