ui5-webcomponents icon indicating copy to clipboard operation
ui5-webcomponents copied to clipboard

[Feature Request]: fiori/BarcodeScannerDialog capture video image from centered region only

Open slin-sap opened this issue 9 months ago • 3 comments

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.

Screenshot 2024-05-08 at 8 34 35 AM

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.

slin-sap avatar May 08 '24 15:05 slin-sap

Hello @SAP/ui5-webcomponents-topic-p ,

Could you please take a look of this feature request?

Thank you in advance!

Kind Regards, Niya

niyap avatar May 09 '24 06:05 niyap

Team will look into this request. Internal reference: BGSOFUIPIRIN-6561

jdichev avatar May 14 '24 09:05 jdichev

POC: https://github.com/SAP/ui5-webcomponents/pull/9259

dobrinyonkov avatar Jun 20 '24 12:06 dobrinyonkov

Merged with https://github.com/SAP/ui5-webcomponents/pull/9646

dobrinyonkov avatar Oct 16 '24 06:10 dobrinyonkov