googlesamples / googlesamples/mlkit

[Feature request] Absolute corner order on barcodes for 3D orientation tracking

Open
#892 0 comments 0 reactions 1 assignee Claimed by @zhouyiself View on GitHub
Dominant language
Kotlin
Stars
4.3k
Forks
3.1k
PR merge metrics
No merged PRs in 30d

Description

I want to use this library for 3D position and orientation tracking of barcodes. The way barcode corner points are returned makes orientation tracking impossible. The library will 'sort' the clockwise order of barcode corners depending on the 'up' direction of the input image independent of the barcode orientation. If the barcode is 'upside-down' relative to the input image, the first point will still be the most top-left corner of the barcode relative to the input image.

**What's your feature request? Please describe.**
I would like a way to get the corner points in order *relative to the barcode itself* rather than relative to the image. The index of each corner of the barcode should stay fixed as it rotates. If the barcode is turned upside-down relative to the image, then corner point [0] should be in the *bottom-right* corner of the code relative to the image.

*In this gif, when I rotate the smartphone with the barcode sideways I want the text to rotate sideways as well.* The current behavior of the barcode scanner will change the corner indices so the text is always upright relative to the image, but if an object is turned upside-down or sideways I want it to register as upside-down or sideways which is currently impossible.
![381344946-522bc5ea-8b91-4ee9-91cd-0385fffc93a3](https://github.com/user-attachments/assets/daa43d9b-c7c0-4fe2-ad48-55ae14f1fdcf)

**Mobile environment**
Both

**Additional context**

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.