html5-qrcode icon indicating copy to clipboard operation
html5-qrcode copied to clipboard

Get coordinates and size of QR Code

Open cfcoderatcodefactory opened this issue 5 years ago • 5 comments

I would like to be able to get the location (coordinates) and size (width and height) of the QR-code inside the viewport/camera viewfinder? Preferrable continuously (i.e.: When user moves camera, QR Code will be «moved» inside the viewfinder, and I want to be able to catch the position/size at all times)

cfcoderatcodefactory avatar May 15 '20 14:05 cfcoderatcodefactory

Thanks for the feature request. I'll try to see if this can be done - however it depends on if the underlying qrcode decode logic supports it. I'll play around to see if this is a low hanging fruit.

mebjas avatar May 22 '20 16:05 mebjas

I have figured out a way to do this, can you share your use case? I'll design the APIs accordingly.

image

mebjas avatar Jul 05 '20 13:07 mebjas

Great! Use case: I have a set of road signs with a lot of info on them. Somewhere on the sign there will be a GR code. When this QR code is recognized I want to add an overlay in the app that has the exact same size and positioning as the sign has in the view-finder. I know the physical size of each sign, the size an position of the QR code on each sign. So if your library is able to find the size and position of the QR code in the viewfinder I can compute the size and position of the overlay.

cfcoderatcodefactory avatar Jul 06 '20 11:07 cfcoderatcodefactory

has this been implemented?

baranelitez avatar Jun 05 '25 14:06 baranelitez

has this been implemented?

no, but you can do it.

ROBERT-MCDOWELL avatar Jun 05 '25 14:06 ROBERT-MCDOWELL