Android Question How get position e size of qrcode detected in google vision?

peacemaker

Expert
Licensed User
Longtime User
 
Last edited:
Upvote 0

drgottjr

Expert
Licensed User
Longtime User
barcode mobile vision can return the so-called "bounding box":
barcode.getBoundingBox()
B4X:
bbox: (Rect)(356, 676, 721, 1034)

from there you can figure out where the barcode is in the image, and some
simple subtraction (right - left, bottom - top) will tell you how large the
barcode is (if that's of any particular use).

the so-called "cornerPoints" field should tell you the same thing. take a look
at both.

i don't know exactly how you're using mobile vision, so i'll leave it at that.
 
Last edited:
Upvote 0

peacemaker

Expert
Licensed User
Longtime User
I quoted the working example above based on latest ML SDK, not previous Vision.
 
Upvote 0

drgottjr

Expert
Licensed User
Longtime User
Ok, but I need in old google vision library or a example (to B4A) in ZBAR or ZXING!

Thanks
which one are you using? and how? it makes no sense to show an example in zxing when you're using mobile vision. and if you're using a 3rd party library, it may not be possible to change it.
 
Last edited:
Upvote 0
Top