gruhn / vue-qrcode-reader

A set of Vue.js components for detecting and decoding QR codes.
https://gruhn.github.io/vue-qrcode-reader
MIT License
2.03k stars 330 forks source link

Scan small DataMatrix #415

Closed viac92 closed 4 months ago

viac92 commented 4 months ago

Hi everyone, I'm implementing a simple DataMatrix reader to extract product data, but I find that DataMatrix codes are too small to be accurately interpreted.

Here's a picture of the DataMatrix code

photo_2024-02-01 17 13 02

Is there any chance to scan a QR code that small? From the picture, the QR code appears quite pixelated, but it's sharp and in focus when viewed via a live stream.

Thank you so much for your assistance!

Sec-ant commented 4 months ago

The image that is fed to the detector is directly captured from the video stream, so you'll have to provide the "sharp and in focus" one and only then can we know if there is any chance to increase the detection rate.

Anyway, proper focal length, exposure and simple background should be helpful.

The core detection part of this library is handled by zxing-cpp, which also provides a streaming detection demo: https://zxing-cpp.github.io/zxing-cpp/demo_cam_reader.html You can also check whether your barcodes can be detected in that demo page.

viac92 commented 4 months ago

Thank you @Sec-ant for the answer, I tried also with the zxing demo but can't scan the code.

I think my phone, iphone 13mini, don't have the right camera for codes that small, I tried with an iphone 13 pro and it works without issues.