aarongrider / vision-camera-ocr

VisionCamera Frame Processor Plugin to detect text in real time using MLKit Text Detector (OCR)
MIT License
235 stars 86 forks source link

Ambiguity in BoundingFrame Type #3

Open hawekotte opened 2 years ago

hawekotte commented 2 years ago

Hey, hey! Love the plugin! 🙏

It looks like right now that for the type definition of BoundingFrame (code link) we have the x and y elements alluded to as the top and left coordinates, respectively. This is mainly due to the fact that we also have boundingCenterX and boundingCenterY included in the object.

But according to getFrame in Android (code link) we are setting x and y to be the exactCenter coordinates.

This appears to almost be a copy of what we are storing for boundingCenter*, and since the Rect object in Kotlin offer left and top properties (doc link) would it make more sense to swap to using those for x and y, respectively?


Edit: It's also worth noting that on iOS we appear to handle the calculation of x and y manually, thus converting them to be top and left, respectively (code link).