Skip to content
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

Cannot Scan DataMatrix codes that are between 5mm - 10mm (CANNOT ZOOM VIDEO) #243

Open
phoenixfire425 opened this issue Jun 25, 2021 · 7 comments

Comments

@phoenixfire425
Copy link

Describe the bug
When scanning Data Matrix codes that are < 10mm it will not read.

Ideally it would be great if we could zoom in on the canvas to have it render or read the barcode.

Using something like Scandit https://websdk.scandit.com/ works flawlessly on these sizes.

I am wondering what they are doing different that would help this scan better

So i have two issues

  1. Cannot scan < 10mm DataMatrix codes
  2. Cannot Zoom the image or canvas to attempt to make this work
@zibranyiszgabor
Copy link

Yes this is a problem. I can't scan a little QR codes. :(

@denguyen-tvit
Copy link

I hope @mebjas can give some advises to fix this problem. Not sure how scandit can make the scanner too fast.

@mebjas
Copy link
Owner

mebjas commented Aug 15, 2021 via email

@denguyen-tvit
Copy link

denguyen-tvit commented Aug 15, 2021

Hi @mebjas

I got the same problem with #264
But I think issue is same with this one, it took time to move camera around the barcode to get scanned.
Here is code I used:

_requestCamera: function() {
            var self = this;
            // This method will trigger user permissions
            Html5Qrcode.getCameras().then(devices => {
                var backCamera = devices[devices.length -1 ];
                self.cameraId = backCamera.id;
                self._initCamera();
            }).catch(err => {
                alert(err);
                //alert('Please allow camera permission to use barcode scanner');
                self.popupSearch.modal('closeModal');
            });
        },
        _initCamera: function() {
            if (!this.html5QrCode) {
                this.html5QrCode = new Html5Qrcode("quick-order-barcode-reader");
            }
            const config = { fps: 24, qrbox: 250 };
            $('#quick-order-barcode-search').trigger('processStart');
            // If you want to prefer back camera
            this.html5QrCode.start({ facingMode: "environment" }, config, this.qrCodeSuccessCallback.bind(this)).then(foo => {
                $('#quick-order-barcode-search').trigger('processStop');
            });
            //this.html5QrCode.start({ deviceId: { exact: self.cameraId} }, config, this.qrCodeSuccessCallback.bind(this));
        },

It scan ok for large image. And take time on real product such as #264
And this EAN_8 big image barcode, but still take time to scan, need to move camera (iphone 7plus) around for > 10 seconds. I tried update fps to 2,10,24 but not help.

ean-8-1png

@mebjas
Copy link
Owner

mebjas commented Oct 21, 2021

Feature request for zoom feature: #330

@fbenedetti06
Copy link

fbenedetti06 commented Apr 1, 2022

  1. Cannot scan < 10mm DataMatrix codes
  2. Cannot Zoom the image or canvas to attempt to make this work

Same issue here and same need
It would be a very desirated improvement

@adityaKlalith
Copy link

adityaKlalith commented May 24, 2022

Hi @mebjas

When the qr code is close to the camera or is not an image of high quality, the scanner doesn't read the code.
The native scanners or google lens present in the mobile devices scans the above mentioned types of codes with ease; this is because of the focus option(manual-finger touch or auto) that they have when the image of the code is placed infront of the device camera(My assumption).
If the above feature (auto or manual focus) can be included in our library(if not already included), then we might be able to solve the issues we are facing.

In simpler words,
can we make the scanner function similar to native scanner in mobile devices?

Kind Regards
Lalith Aditya

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants