Build-in QRcode scanner also read [QRCODE]

  • Frans Stuurman
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
3 years 2 months ago #147482 by Frans Stuurman
Build-in QRcode scanner also read [QRCODE] was created by Frans Stuurman
The build-in QRcode scanner is a fantastic development. Thank you.
The scanner reads only the [TICKET_QRCODE] tag.
Would it be possible that the scanner also reads the old [QRCODE] tag?

Motivation
The build-in scanner seems slow, sometimes irreliable, especially in low light conditions.
I would like to try out the new build-in scanner, but it might be possible that conditions at the entrance prevent succesful scanning. That would be a small disaster. So it seems appropriate to limit the new scanner to only a few people at the entrance (who would know what to do when scan fails; i.e. fallback to standard reader on Android and iPhone).

Thanks, regards Frans
 

Please Log in or Create an account to join the conversation.

More
3 years 2 months ago #147491 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Build-in QRcode scanner also read [QRCODE]
Hello

For reading [QRCODE] tag and then redirect to the URL from that QR CODE, I would suggest to use a native mobile app. There are many apps for that available and it works better

For slow, I'm unsure where it comes from. In the QR CODE menu item type, I added a parameter called Checkin Interval. It is 15 seconds by default. It is the time between the two actual scans (I add this to prevent too much scans and too much request for checkin). If you think that it is slow, you can reduce the value of that parameter

Regards,

Tuan

Please Log in or Create an account to join the conversation.

  • Frans Stuurman
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
3 years 1 month ago #147968 by Frans Stuurman
Replied by Frans Stuurman on topic Build-in QRcode scanner also read [QRCODE]
Hello Tuan,

I did some experimenting with the built-in scanner and found some settings in the javascript which influence the scanning speed. I do not know if you tried these and rejected them for some reason. The settings apply to the parameters of the Html5QrcodeScanner.
1. In low light conditions the camera of my android (Xiaomi Mi A1) has trouble focusing. The image wanders between sharp and unsharp. The parameter is set to be fps: 1, which means that a scan attempt is done every second. Because there is not much chance that a focused image is available, it can take a long time before a sharp image is send for QR code recognition. I have set fps: 10.
2. I have limited the type of code to recognise to QRcodes only with parameter: formatsToSupport: [ Html5QrcodeSupportedFormats.QR_CODE ]}. Now the software does not attempt to recognise other types of barcodes.
3. Last, i have set it to use the native camera QRcode detection with parameter:  experimentalFeatures: {useBarCodeDetectorIfSupported: true}. I understand you would hesitate to use an experimental feature. However, from the associated github comments of the Html5qrcode software I understand that it will soon be supported as a regular feature.
4. Limiting the field of view by setting qrbox: 250 also helps reducing the time for recognising a qrcode. Unfortunately there is still a bug in the software which causes this option to malfunction when rotating the smartphone, so this is a future improvement not recommended now.
5. An other way of limiting the view is using aspectRation: 1.0. This gives a square camera view. Apart from reducing the amount of image to scan, it also makes the buttons below the scan area visible without scrolling.

So, I have altered the statement on my test system as follows:

var html5QrcodeScanner = new Html5QrcodeScanner("reader", {fps: 10, /* qrbox: 250,*/ aspectRatio: 1.0,  experimentalFeatures: {useBarCodeDetectorIfSupported: true}, formatsToSupport: [ Html5QrcodeSupportedFormats.QR_CODE ]}, /* verbose= */false);
 

and the speed of scanning is vastly improved on my low end smartphone, sometimes even instantaneous.

I would like your thoughts about these options.

Also, I would like to introduce the altered javascript on my production system. However do not see a method to override the javascript & do not want to replace the standard version as it will be overwritten with updates. Is it possible to override javascript?

Regards, Frans

Please Log in or Create an account to join the conversation.

Moderators: Tuan Pham Ngoc