what is the difference between getCornerPoints() and getBoundingBox() in TextBlock (android vision)

843 Views Asked by At

I am confused about the what is the deffrence between getCornerPoints() and getBoundingBox() in TextBlock as they both return the coordinate of the corner points of the bounding box?? any body can clarify?

1

There are 1 best solutions below

0
On

According to the docs, getBoundingBox() returns a Rect that is axis-aligned. This is the area that the detected image takes up when projected in 2D space. Calling getCornerPoints(), on the other hand, accounts for perspective. As a result, it is not guaranteed to be a rectangle. With different angles you may receive boundaries in the shape of parallelograms or trapezoids using this method.