barcode-scanner icon indicating copy to clipboard operation
barcode-scanner copied to clipboard

[ML-Kit] append a DOM element with matrix3d transform for each scanned

Open JanMisker opened this issue 2 years ago • 7 comments

I'm testing with the ml-kit branch, works really well already! I see that the coordinates of each recognised element are also included, it would be cool to put a 'box' around each. You could of course simply draw lines on a canvas or so, but it could also be possible to add a DOM element that is precisely position on the right coordinates, and also has a matrix3d transform applied such that anything inside that element gets the correct perspective. In my opinion this could be added in the plugin, in the web layer.

This SO post has a lot of info as well as example implementations. https://math.stackexchange.com/questions/296794/finding-the-transform-matrix-from-4-projected-points-with-javascript

I'm putting this here as reference also for myself, I would be willing to help out with this feature.

JanMisker avatar Mar 16 '23 15:03 JanMisker