I'm using JSQR library in ReactJS project to read QR code from image (jpg/png). Everything works fine but when QR code size is slightly small (not much, check the attached image), it fails several times.
If I upload only cropped area of QR code, it reads it.
Current work flow of website: It takes QR code image and convert it into ImageData
using canvas and then pass that ImageData
along with dimensions to JSQR (const code = jsQR(imageData, width, height);
).
How I can improve it? Is their any way to auto-detect QR code location in image to improve scanning?
I found a solution for this. I'm posting it here for anyone facing similar issue.
It worked with a fork of jsQR libray jsQR-es6
(link). I think its a improved version of jsQR with es6 support.