ui5-webcomponents
ui5-webcomponents copied to clipboard
[Feature Request]: fiori/BarcodeScannerDialog capture video image from centered region only
Feature Request Description
Current implementation seems to pass the entire image captured by camera to zxing. This might lead to an unexpected nearby barcode label to be capture instead.
Proposed Solution
It is better to show a focused region like this example screenshot. Or something similar to UI5 sap.ndc.BarcodeScanner animated scanning css effect. This can help user to position camera so that the barcode label fits within the centered region.
In the code, only the centered region needs to be draw to image canvas, and pass to zxing for barcode recognition.
This might require capturing video frame as image as done in sap.ndc.BarcodeScanner and then use codeReader.decodeFromImage
API instead of decodeFromVideo
.
https://github.com/zxing-js/library/blob/master/docs/examples/barcode-image/index.html
Proposed Alternatives
No response
Organization
UX Engineering
Additional Context
No response
Priority
Medium
Privacy Policy
- [X] I’m not disclosing any internal or sensitive information.
Hello @SAP/ui5-webcomponents-topic-p ,
Could you please take a look of this feature request?
Thank you in advance!
Kind Regards, Niya
Team will look into this request. Internal reference: BGSOFUIPIRIN-6561
POC: https://github.com/SAP/ui5-webcomponents/pull/9259
Merged with https://github.com/SAP/ui5-webcomponents/pull/9646